C/C++
#include <iostream>
using namespace std;
int main(){
int from = -6;
int to = 5;
int sum = 0;
for (int i = from; i < to; i++)
sum += i;
cout << sum;
return 0;
}
К консоль будет выведено: -11
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
C/C++
#include <iostream>
using namespace std;
int main(){
int from = -6;
int to = 5;
int sum = 0;
for (int i = from; i < to; i++)
sum += i;
cout << sum;
return 0;
}
К консоль будет выведено: -11