c语言写个程序,用cfree做,三个数比大小,输出最大的数,怎么写?
答案:4 悬赏:0
解决时间 2021-01-29 11:54
- 提问者网友:兔牙战士
- 2021-01-28 15:45
c语言写个程序,用cfree做,三个数比大小,输出最大的数,怎么写?
最佳答案
- 二级知识专家网友:青尢
- 2021-01-28 17:04
//#include "stdafx.h"//VC++6.0加上这一行.
#include "stdio.h"
void main(void){
int a,b,c;
printf("Type 3 numbers...\n");
scanf("%d%d%d",&a,&b,&c);
printf("The max is %d\n",a>b && a>c ? a : b>a && b>c ? b :c);
}
#include "stdio.h"
void main(void){
int a,b,c;
printf("Type 3 numbers...\n");
scanf("%d%d%d",&a,&b,&c);
printf("The max is %d\n",a>b && a>c ? a : b>a && b>c ? b :c);
}
全部回答
- 1楼网友:玩家
- 2021-01-28 21:03
用if
追答:比较三次
追答:比较三次
- 2楼网友:人间朝暮
- 2021-01-28 19:52
高中数学好像就有
追答:if
追答:if
- 3楼网友:白昼之月
- 2021-01-28 18:30
等下,正在输入追答
追答:#include〈stdio.h〉int main()
{
double a,b,c,x;scanf(“%lf%lf%lf”,&a&b&c)算了,手机敲太慢了,明天用电脑搞吧
追答:#include〈stdio.h〉int main()
{
double a,b,c,x;scanf(“%lf%lf%lf”,&a&b&c)算了,手机敲太慢了,明天用电脑搞吧
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯