头文件
#include<bits/stdc++.h>
using namespace std;
int main(){
}
1000
#include <bits/stdc++.h>
using namespace std;
int main() {
//定义两个变量
int a,b;
cin>>a>>b;
//计算它们的和,并输出
cout<<a+b;
return 0;
}
1002
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,sum=0;
cin>>a;
for(int n=1;n<=a;n++){
sum+=n;
}cout<<sum;
}
1003
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,sum=0;
cin>>a;
for(int n=1;n<=a;n++){
sum+=n;
n+=1;
}cout<<sum;
}
1004
<