Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- //find large number using Ternary Operator( inplace of conditional statement)
- {
- int a,b,result;
- printf("enter two number :\n");
- scanf("%d%d",&a,&b);
- result=(a>b)?a:b;// syntex =(condition) ? value_if_true : value_if_false
- printf("large number: %d",result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement