#include <iostream>
#include <cstdlib>
usingnamespace std;
int main(int argc, constchar *argv[]) {
int i = 10;
for(; i >= 0; i--) {
cout << i << endl;
if (i == 3) break;
}
return 0;
}
Or you can write more simply
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
#include <cstdlib>
usingnamespace std;
int main(int argc, constchar *argv[]) {
int i = 10;
do
{
cout << i << endl;
if (i == 3) break;
} while ( i-- );
return 0;
}