问题及代码:
/*。
*Copyright(c)2014,烟台大学计算机学院
*All right reserved,
*文件名:test.cpp
*作者:liu_feng_zi_
*完成日期:2014年10月12日
*版本号:v1.0
*
问题描述:
*输入描述:输入三个整数
*程序输出:输出最大值
*/
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d,max;
cout<<"输入三个整数:";
cin>>a>>b>>c;
if(a>b)
d=a;
else
d=b;
if(d>c)
max=d;
else
max=c;
cout<<"最大值:"<<max<<endl;
return 0;
}
运行结果:
知识点总结:作比较时,要引入一个字符,运行方便
学习心得:真的很累