Program to print out the largest of 3 numbers. If you have any doubts, please let me know.
#include<stdio.h> void main() { int large,x,y,z; printf("enter the 3 numbers"); scanf("%d",&x); scanf("%d",&y); scanf("%d",&z); large=(x>y?(x>z?x:z):(y>z?y:z)); printf("%d",large); }
#include<stdio.h> void main() { int large,x,y,z; printf("enter the 3 numbers"); scanf("%d",&x); scanf("%d",&y); scanf("%d",&z); large=(x>y?(x>z?x:z):(y>z?y:z)); printf("%d",large); }
No comments:
Post a Comment