0
6.5kviews
Write a program to find the biggest of given 3 no's using conditional operator.
1 Answer
0
1.6kviews

Algorithm:

  • Start.
  • Initialize variables a b c and big.
  • Using conditional operator compare three numbers.
  • Assign biggest number to big and print the number.
  • Stop.

Program Code:

#include<stdio.h>
int main() {
    int a,b,c,big;
    printf("\nEnter 3 numbers:");
    scanf("%d %d %d", &a, &b, &c);
    big=(a>b && a>c? a:b>c? b:c);
    printf("\nThe biggest number …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.