int sum = 0;for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j+=2) sum += (i+j);
Standard input is empty
int sum = 0; for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j+=2) sum += (i+j);
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!