Write a program using a function max() to find out the maximum of three numbers. Take the numbers from the user as input.

#include<stdio.h>

#include<math.h>

int main()

{

  int a,b,c;

  printf("Enter the three numbers = ");

  scanf("%d %d %d",&a,&b,&c);

  if(a>b && a>c)

  {

     printf("a is the biggest among a,b,c .");

     exit(1);

  }

  if(b>c )

  {

  printf(" b is the biggest among a,b,c");

  }

  else

  {

  printf("c is the greatest among a,b,c ");

  }

}
Write a program using a function max() to find out the maximum of three numbers. Take the numbers from the user as input.  Write a program using a function max() to find out the  maximum of three numbers. Take the numbers from the  user as input. Reviewed by Unknown on 03:33 Rating: 5

No comments:

Powered by Blogger.