问题与代码:
文件名称:求三个数最大值
作者:邓哲
时间:2016年10月
输入:三个正整数
输出:三个数中的最大值
#include <stdio.h>
int main()
{
int a,b,c,t;
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
t=a;
}
else
{
t=b;
}
if(t>c)
printf("%d",t);
else
printf("%d",c);
return 0;
}
知识点总结:if 后加小括号输入判断的内容后不加分号
学习心得:只看一本书是不够的,要多看书。