//temp_0x00000001.cpp
//To verify the 13th on the mathematics (of science subjects) paper of the Exam of the Union of "Known Schools in Northern Anhui". - Quick programming
//DEBUGGING ON codepad
#include <iostream>
using namespace std;
int main() {
int i=1, S=0, n[4]={1, 0, -1, 0};
cout<<"#init: i="<<i<<", S= "<<S<<"\n";
do {
cout<<"#S="<<S<<"+"<<(n[i%4])<<"=";
S+=n[i%4];
cout<<S<<"\n";
cout<<"#i="<<i<<"+1"<<"=";
i++;
cout<<i<<"\n";
} while (!(i>5));
cout<<"#Result: S="<<S<<"\n";
return 0;
}