#include <stdio.h>
#include<stdlib.h>
#include<time.h>
void main(){
int a,b,c,tmp,max;
srand((unsigned)time(NULL));
puts("请输入三个数比较谁最大.");
a=1+rand()%100;
b=1+rand()%100;
c=1+rand()%100;
max=a>b?(a>c?a:c):(b>c?b:c);
printf("%d\t%d\t%d\t",a,b,c);
printf("最大值%d",max);
}
c语言三个数找最大值
最新推荐文章于 2024-12-05 12:12:02 发布