任务和代码
/*
*Copyright (c)2017,优快云学院
*All rights reserved.
*文件名称:main.c
*作者:胡益林
*完成日期:2017年06月10日
*版本号:V1.0
*
*问题描述:输入3个整数,输出其中的最大值。
*程序输出:输出最大值。
*/
#include<stdio.h>
int main()
{
int a,b,c,t;
printf("请输入3个整数:");
scanf("%d %d %d",&a,&b,&c);
if(a<b)
{
t=b;
}
else
{
t=a;
}
if(t<c)
{
printf("max=%d\n",c);
}
else
{
printf("max=%d\n",t);
}
return 0;
}
运行结果
知识点总结
无。
心得
无。