Computer Science, asked by priyadharshinir2803, 1 year ago

Rewrite the following using ternary operator.
If(income <=10000)
tax=0;
else
tax=12

Answers

Answered by KameenaYaar01
26

Biggest Of Three Numbers Using Conditional operator/Ternary Operator in C

# 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 gowrarajinchara
9

Answer:

Biggest Of Three Numbers Using Conditional operator/Ternary Operator in C

# 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)

hope it is helpful to you..

Similar questions