fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int s, k;
  5. s = 0, k = 0;
  6. while (k < 12) {
  7. s = s + 2*k;
  8. k = k + 3;
  9. }
  10. cout << s << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 5664KB
stdin
Standard input is empty
stdout
36