Write a complete program to output a right-triangle print version of a user's message. The program will
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a complete program to output a "right-triangle print" version of a user's message.
The program will have three methods: a main method and two overloaded versions of a trianglePrint method.
main Method Specifications
In main, the program will accomplish the following tasks:
- Read in a message from the user.
- If the message is less than 20 characters long, invoke the one-parameter trianglePrint method.
- If the message is 20 characters or longer:
- Ask the user to choose an interval that is at most half the length of the message.
- Use a loop to continue to read in an interval until you get a valid value.
- Invoke the two-parameter trianglePrint method.
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date: