Jump to content
Hash, Inc. - Animation:Master

C++ 2023 Week 10


robcat2075

Recommended Posts

  • Hash Fellow

Lesson 20  For Loops

Do this for your assignment: Make a program that will prompt the use for a number from 0 to 60 and print out a row of that many Xs.

If the entered number is 0 the program exits.

Sample run:

Rows of Xs!

How many Xs do you want? 8

XXXXXXXX

How many Xs do you want? 13

XXXXXXXXXXXXX

How many Xs do you want? 0

We're done!

 

This project uses both "for loop" and your recently acquired "do while" skills.

Hint: First write and test a for loop that prints out a row of n Xs.

 

@Roger @Rodney @Shelton

  • Like 1
Link to comment
Share on other sites

  • robcat2075 changed the title to C++ 2023 Week 10

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...