提交时间:2023-01-11 15:13:26
运行 ID: 4014
#include <iostream> using namespace std; int main() { int n; cin >> n; int t = 1; int sum; while (t <= n) { sum += t; t += 1; } cout << sum; return 0; }