Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ 2 of 4 Ladder.cpp Your program will build ladders out of hashtags (#). It will ask the user how tall the ladder should be:
C++
2 of 4 Ladder.cpp Your program will build ladders out of hashtags (#). It will ask the user how tall the ladder should be: "How tall of a ladder do you need?", and what it does after that will depend on the user's input. If the input is 0, tell the user "The height can't be zero." and re-prompt for input If the input is less than 0, tell the user "That is invalid" and end the program. If the input is greater than 0, print a hashtag ladder of the specified height, and prompt for another input. Sample Output: How tall of a ladder do you need? 0 The height can't be zero. How tall of a ladder do you need? 3 How tall of a ladder do you need? 5 How tall of a ladder do you need? 4 How tall of a ladder do you need?-1 That is invalid Optional challenge: Can you ask the user how wide he/she wants the ladder, and accommodate him/her Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started