wirte a c program to find the largest of three numbers using conditional opertors
Answers
Answered by
2
Answer:
In this Program we have used the conditional operator for comparing biggest of three numbers.
# include <stdio.h>
void main()
{
int a, b, c, big ;
printf("Enter three numbers : ") ;
scanf("%d %d %d", &a, &b, &c) ;
big = a > b ? ( a > c ? a : c) : (b > c ? b : c) ;
printf("\nThe biggest number is : %d", big) ;
Answered by
2
Answer:
In this Program we have used the conditional operator for comparing biggest of three numbers.
# include <stdio.h>
void main()
{
int a, b, c, big ;
printf("Enter three numbers : ") ;
scanf("%d %d %d", &a, &b, &c) ;
big = a > b ? ( a > c ? a : c) : (b > c ? b : c) ;
printf("\nThe biggest number is : %d", big) ;
Explanation:
please mark me brainliest.
Similar questions