Write a program that prints out a simulated candle of the entered size. The program prompts the
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a program that prints out a simulated candle of the entered size. The program prompts the user for two positive integers (>- 0) where the first number represents the candle and the second number represents the wick. You must validate each number and re-prompt until a number greater or equal to zero has been entered.
Create a function that expects two parameters: one parameter called candleSize defines the size of the candle, and the second parameter called wickSize defines the size of the wick. The function then draws a candle as specified. Use an appropriate return type.
Example (blue represents user input):
Candle size: -
5 Candle size: -
8 Candle size: 8 Wick size:
2 Output:
Related Book For
Posted Date: