#include <iostream> int main() { int counter = 3; while (counter > 0) { std::cout << "Hello!\n"; counter--; } std::cout << "counter is OutPut: " << counter; return 0; }
Hello! Hello! Hello! counter is OutPut: 0