/*Write a c program to find the largest of three numbers */ #include <stdio.h> #include <stdlib.h> int main() { int a,b,c; printf("Enter three numbers :\n"); scanf("%d%d%d",&a,&b,&c); if (a>b&&a>c) printf("%d is largest\n",a); else if(b>a&&b>c) printf("%d is largest\n",b); else printf("%d is largest\n",c); return 0; }
Enter three numbers : 652 845 254 845 is largest
No comments:
Post a Comment