Computer Science, asked by Lovepreet7359, 10 months ago

Write a c program to find largest number among three numbers

Answers

Answered by sushiladevi4418
4

Answer:

C program to find the largest number among three numbers.

Explanation:

/* c program to find largest number among 3 numbers*/

#include <stdio.h>

 

int main()

{  

   int a,b,c;

   int largest;

 

   printf("Enter three numbers (separated by space):");

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

 

   if(a>b && a>c)        

       largest=a;

   else if(b>a && b>c)        

       largest=b;

   else

       largest=c;

 

   printf("Largest number is = %d", largest);

 

   return 0;

}

Similar questions