C++ Program to Print Hello World 10 Times using While Loop

Write C++ Program to Print Hello World 10 Times using While Loop

// CPP Program to Print Hello World 10 Times using While Loop

#include <iostream>

using namespace std;

int main()
{
	int i = 0;

	while(i < 10)
	{
		cout << "Hello World\n";

		i++;
	}

	return 0;
}

Output:

Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World

≪ Previous | Next ≫