Calculate a/(b-c)

Problem Statement
Write a c programme to
  1. scan three numbers a,b,c
  2. then calculate a/(b-c) 


#include<stdio.h>
int main()
{
  float a;
  int b,c;
  printf("enter the value of a,b,c resp. \n");
  scanf("%f %d %d",&a,&b,&c);
  if(b==c)
    {
      printf("the value of the problem is infinity \n");
    }
  else
    {
      printf("the value of a/(b-c) is %f", a/(b-c));
    }
  return 0;
}



No comments:

Post a Comment