#include
using namespace std;
int main() {
int short s = 1, N = 1;
cout << “请输入一个数N” << endl;
cin >> N;
while (N >= 0) {
s = (N + 1) * N / 2;
cout <<s<<" "<<“请输入一个数N” << endl;
cin >> N;
if (N< 0)continue;
}
return 0;
}
#include
using namespace std;
int main() {
int a=1, b=2, c=3, d=4, e=5;
for (; a <= 5;) {
a++, b =b+2, c=c+3, d=d+4, e=e+5;
cout << a << “\t” << b << “\t” << c << “\t” << d << “\t” << e << endl;
}
return 0;
}