1.输出三个数中的最大值

 1  #include <stdio.h>
 2 #include <stdlib.h>
 3 
 4 int main()
 5 {
 6     int a ,b,c,max1,max ;
 7     scanf("%d%d%d",&a,&b,&c);
 8     max1 = (a>b)? a:b;
 9     max = (c>max1)? c: max1;
10     printf("max =%d ",max);
11     return 0;
12 }

 

posted @ 2019-01-10 21:15  小孢子  阅读(278)  评论(0编辑  收藏  举报