Write a C program to find the maximum number from 3 numbers.

int main();
{         int a,b,c;
           printf(“Enter value of A:”);
           printf(“Enter value of B:”);
           printf(“Enter value of C:”);
           ((a>b)&&(a>c))?printf(“%d is maximum”,a):((b>c)&&(b>a))?printf(“%d is maximum”,b):printf(“%d is               maximum”);
           return 0;
Here the conditional statement is used.The syntax of the conditional statement is:
(condition)?(True statement):(New condition or False statement)

You may also like...

Leave a Reply