Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Created by Shashwat Raj
- //A program to find greatest No. among 3 Nos. using Ternary Operator
- #include<stdio.h>
- void main()
- {
- int a=7,b=4,c=9;
- int larg;
- larg=(((a>b)&&(a>c))?a:((b>c)?b:c));
- printf("Largest Number : %d",larg);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement