Loop with 5 questions only

Hi! I am new to programming and C++ so please bear with me.

How can I loop with only 5 questions in it? Like when I press F5 in my Visual Studio I will see my 5 questions in it.

Or in short how can I loop this code in 5 questions only:

int main
{
char name;

cout << "What is your name?" << endl;
cin >> name;

cout << "Input name:<< name;
}
If you're trying to loop, you're gonna need a loop such as for, while, do while.

If you're just trying to cout 5 questions, you can just declare 5 variables and cout what to cin afterwards. By the way, a char variable only takes exactly one character. Very few names in the world consist of only one character.
Hello! Thanks for the reply I think I have finally solved my problem

Here is my code:

for(int i =0;i < 5; i++)
{
cout <<"What is your name?" << endl;
}

But anyway, thanks for the reply,i really appreciate it.
Topic archived. No new replies allowed.