input 3 numbers. print out maximum using ternary operator
Answers
Answered by
19
Explanation:
#include<stdio.h>
void main()
{
int a,b,c,t,max;
printf("enter 3 numbers\n");
scanf("%d%d%d",&a,&b,&c);
t=a>b?a:b;
max=t>c?t:c;
printf("\nmax value is %d",max);
}
Similar questions
English,
1 month ago
Science,
1 month ago
Social Sciences,
3 months ago
Biology,
10 months ago
Biology,
10 months ago