Ответ:
#include <iostream>
using namespace std;
int main() {
int n, i = 1, sum = 0;
cin>>n;
while (i<=n) {
sum += i;
i++;
}
cout<<sum;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <iostream>
using namespace std;
int main() {
int n, i = 1, sum = 0;
cin>>n;
while (i<=n) {
sum += i;
i++;
}
cout<<sum;
}