/*
============================================================================
Name : C-Programming
Author : Code2care
Version : 1.0
Copyright : Code2care.org
Description : 90 : C Program that reads three numbers from user and displays the
biggest among them
============================================================================
*/
#include
#include
int main(void) {
int a, b, c, biggest_no = 0;
printf("C Program to find Biggest among three numbers :");
printf("\nEnter No. A : ");
scanf("%d", &a);
printf("Enter No. B : ");
scanf("%d", &b);
printf("Enter No. C : ");
scanf("%d", &c);
if ((a >= b) && (a >= c)) {
biggest_no = a;
} else if ((b >= a) && (b >= c)) {
biggest_no = b;
}
else {
biggest_no = c;
}
printf("\n The Biggest Number among %d,%d,%d is %d", a, b, c, biggest_no);
return 0;
}
-
Output :
C Program to find Biggest among three numbers :
Enter No. A : 40
Enter No. B : 50
Enter No. C : 60
The Biggest Number among 40,50,60 is 60
C Program to find Biggest among three numbers :
Enter No. A : 30
Enter No. B : 90
Enter No. C : 100
The Biggest Number among 30,90,100 is 100
The best way to learn C programming is to practice more and more of programs .
Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.
BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.