Write a c program to find largest number among three numbers
Answers
Answered by
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
Math,
5 months ago
Hindi,
5 months ago
Accountancy,
5 months ago
Computer Science,
10 months ago
Hindi,
10 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago