Question #301194

Make a c++ program that will print the given output using do while loop.




Output:



5



6



7



8



9

Expert's answer

#include <iostream>
using namespace std;

int main() {
    int count = 5;

    do {
        cout << count << endl;
        count++;
    } while (count < 10);

    return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS