1, For each loop with example
2, do while loop with example
#include <iostream>
using namespace std;
int main(){
int i;
cout<<"For loop\n";
for(i = 0; i < 10; i++){
cout<<i<<endl;
}
cout<<"\ndo while loop\n";
i = 0;
do{
cout<<i<<endl;
i++;
}while(i < 10);
return 0;
}
Comments
Leave a comment