99-98+97+96+95-94+6+5-4+3-2+1
а?
#include <iostream>
using namespace std;
signed main() {
int s = 0;
for (int i = 99; i >= 1; i--) {
if ((i & 1) == 0)
s -= i;
else
s += i;
}
cout << s;
return 0;
99-98+97+96+95-94+6+5-4+3-2+1
а?
#include <iostream>
using namespace std;
signed main() {
int s = 0;
for (int i = 99; i >= 1; i--) {
if ((i & 1) == 0)
s -= i;
else
s += i;
}
cout << s;
return 0;
}