Answer to Question #248509 in C++ for Tege

Question #248509

1, For each loop with example

2, do while loop with example


1
Expert's answer
2021-10-09T04:45:10-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS