If Statement Program in C/C++ This Program is for " IF Statement ", which prints out numbers from 1-10. #include<iostream> using namespace std; int main() { int i; for( i=1;i<=10;i++) { cout << "no." << i <<endl; } }
Continue/Break Statement in c/c++ This program is for the jumping of loops. The code for this program is given below: #include<iostream> #include<stdio.h> #include<conio.h> using namespace std; int main() { int i; for(i=1;i<=10;i++) { if(i==3) { continue; } if(i==8) { break; } cout << i << '\t'; } }
Comments
Post a Comment