online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// Programa que genera la secuencia: // 1, 5, 3, 7, 5, 9, 7, ..., 23 // 11/09/2000 Salvador Pozo #include <iostream> // biblioteca para uso de cout using namespace std; int main() // función principal { int i = 1; // variable para bucles bool sumar = true; // Siguiente operación es suma o resta bool terminado = false; // Condición de fin do { // Hacer cout << i; // muestra el valor en pantalla terminado = (i == 23); // Actualiza condición de fin // Puntuación, separadores if(terminado) cout << "."; else cout << ", "; // Calcula siguiente elemento if(sumar) i += 4; else i -= 2; sumar = !sumar; // Cambia la siguiente operación } while(!terminado); // ... mientras no se termine cout << endl; // Cambio de línea return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue