这是一个入门的题目,目的是为了你让学会使用这个oj
你可以使用c++风格的cin,cout来解这个题目
c++
cin,cout
123456789 #include <iostream> //头文件,为了使用cin,cout using namespace std; //标准命名空间 int main() { int a,b;//定义变量 cin >>a >> b; // 读取数值,分别读取到a,b里 cout << a+b; //输出两个值相加后的结果 return-0; }
#include <iostream> //头文件,为了使用cin,cout using namespace std; //标准命名空间 int main() { int a,b;//定义变量 cin >>a >> b; // 读取数值,分别读取到a,b里 cout << a+b; //输出两个值相加后的结果 return-0; }