正文
增加 16 行删除 16 行
6 行未改动789101112131415161718192021224 行未改动27282930313233343536373839404142434445466 行未改动方法1:```#include<bits/stdc++.h>//万能头using namespace std;int a,b,c;//定义三个数 a,b,cint main(){//main是代码的“入口”cin>>a>>b;//从键盘输入c=a+b;//把a和b的和储存在c里cout<<c<<endl;//输出creturn 0;//正常结束程序}```嗯,的确很简单,那用函数呢???4 行未改动方法2:```#include<bits/stdc++.h>//万能头using namespace std;int a,b,c;//定义三个数 a,b,cint sum(int x,int y){//相当于a和bc=x+y;//把a“x”和b“y”的和储存在c里return c;//返回两数之和“c”}int main(){//main是代码的“入口”cin>>a>>b;//从键盘输入cout<<sum(a,b)<<endl;//输出creturn 0;//正常结束程序}```好像也不简单呀。。。# 这就是小白的题解,~~希望能通过~~。。。 __6 行未改动789101112131415161718192021224 行未改动27282930313233343536373839404142434445466 行未改动方法1:```#include<bits/stdc++.h>//万能头using namespace std;int a,b,c;//定义三个数 a,b,cint main(){//main是代码的“入口”cin>>a>>b;//从键盘输入c=a+b;//把a和b的和储存在c里cout<<c<<endl;//输出creturn 0;//正常结束程序}```嗯,的确很简单,那用函数呢???4 行未改动方法2:```#include<bits/stdc++.h>//万能头using namespace std;int a,b,c;//定义三个数 a,b,cint sum(int x,int y){//相当于a和bc=x+y;//把a“x”和b“y”的和储存在c里return c;//返回两数之和“c”}int main(){//main是代码的“入口”cin>>a>>b;//从键盘输入cout<<sum(a,b)<<endl;//输出creturn 0;//正常结束程序}```好像也不简单呀。。。# 这就是小白的题解,~~希望能通过~~。。。 __