Vision and dreams are the blueprints of soul and achievements.
-Mohammed Ahmed F

Largest among three numbers

#include<stdio.h>
int main(){
    int a,b,c;
    printf("\nEnter 3 numbers: ");
    scanf("%d %d %d",&a,&b,&c);
    if(a-b>0 && a-c>0)
         printf("\nGreatest is a :%d",a);
    else
         if(b-c>0)
             printf("\nGreatest is b :%d",b);
         else
             printf("\nGreatest is c :%d",c);
    return 0;
}
 
OUTPUT:
Enter 3 numbers: 32
86
85
Greatest is b : 86

Share this

Related Posts

Dear User,

Thank you for your comment. Hope you like this blog. Kindly share us on Social Media so others can be updated.

-Chief Administrative Officer.

Note: only a member of this blog may post a comment.