Playground
#include <iostream> using namespace std; int main() { int s = 0; for (int i=0; i<10; i++) { if (i == 6) break; s = s + i; } //0+1+2+3+4+5 = 15 cout << s << endl; //pechati '15' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!