问题及代码
/*。
*Copyright(c)2014,烟台大学计算机学院
*All right reserved,
*文件名:test.cpp
*作者:liu_feng_zi_
*完成日期:2014年10月12日
*版本号:v1.0
*
问题描述:
*输入描述:输入两个正整数a,b
*程序输出:输出两个数的正差值
*/
#include <iostream>
using namespace std;
int main()
{
int a,b,z;
cin>>a>>b;
if (a>b)
z=a-b;
else
z=b-a;
cout<<z<<endl;
return 0;
}
运行结果:
知识点总结:记住if之后是()
学习心得:c++博大精深