Write a C program to ask the user 3 number and display in the greater value from it. Only use compound condition in if-Else statements.
#include <stdio.h> int main(){ int a,b,c; printf("Enter integer1: "); scanf("%d",&a); printf("Enter integer2: "); scanf("%d",&b); printf("Enter integer3: "); scanf("%d",&c); printf("The largest of numbers entered = "); if(a>b && a>c){ printf("%d\n",a); } else if(b>c){ printf("%d\n",b); } else{ printf("%d\n",c); } return 0; }
Get Answers For Free
Most questions answered within 1 hours.