Write a program to print compare two numbers using ternary operators
Program:
#include<stdio.h> #include<conio.h> void main() { int a,b,c; printf("enter two number"); scanf("%d",&a,&b); c=((a>b)?a:b); printf("%d is greater",c); getch(); }
Output:
enter two number 12 24 24 is greater
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer