write a c program to find the largest of three numbers in a c programing language

largest of three numbers 

write a c program to find the largest of three numbers :

#include<stdio.h>
int main()
{
int num1,num2,num3,largest;
printf("Enter three numbers :\n ");
scanf("%d %d %d",&num1,&num2,&num3);
if(num1>=num2&&num1>=num3)
{
largest=num1;
}else if(num2>=num1&&num2>=num3){
largest=num2;
}else{
largest=num3;
}
printf("The largest number is %d \n",largest);
return 0;
}

Thanks   you   for   reading .   For   more   knowledge   click   here

 Learning C programming language from basics concept include with PROGRAMS:

 https://kodewithgy.blogspot.com/2024/09/learning-c-programming-language-from.html

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post