Program to show the usage of continue statement
#include <iostream>
using namespace std;
int main() {
for (int i = 1; i <= 5; i++) {
// condition to continue
if (i == 3) {
continue;
}
cout << i << endl;
}
system("pause");
return 0;
}
Comments
Leave a comment