啊哈磊_编程从这里起步
标题:
为什么小数打出来后没有效?
[打印本页]
作者:
麦梓睿
时间:
2021-1-16 21:01
标题:
为什么小数打出来后没有效?
#include <stdio.h>
#include <stdlib.h>
int main()
{
double a,b,c;
printf("请分别输入三个数");
system("pause");
scanf("%d %d %d",&a,&b,&c);
system("color E2");
if(a>=b && a>=c) printf("%d最大",a);
if(b>a && b>=c) printf("%d最大",b);
if(c>a && c>b) printf("%d最大",c);
return 0;
}
复制代码
作者:
麦梓睿
时间:
2021-1-16 21:01
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
printf("请分别输入三个数(不是小数)");
system("pause");
scanf("%d %d %d",&a,&b,&c);
system("color E2");
if(a>=b && a>=c) printf("%d最大",a);
if(b>a && b>=c) printf("%d最大",b);
if(c>a && c>b) printf("%d最大",c);
return 0;
}
复制代码
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2