how can use the while loop to print my name 10 times

Onlineshade commented: Where is the code? -1

Recommended Answers

All 7 Replies

how can use the while loop to print my name 10 times

Have you studied your text book about loops? If not then you should do so now. You will have to create an int variable that will be used to count from 0 to 10.

int num = 0;

while(num != 10)
{     cout << "your name goes here" << endl;
      num++;
}
commented: Good job on doing this guy's homework... poorly -4
commented: Dont go to code directly.Give him a chance to try this. +0

You should read a book or watch some tutorials, its something basic and wont be hard to learn.

Is it so tough uaremine?
Do you have any book for basic operations?
Do you have try any? If not, try some thing and post the code.

If you cant do your code using while loop you can use another loops. But you have to try some codes. Is it clear?
Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.