Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that asks the user for two positive integers between 2 and 10 to use for the length and width of a rectangle.
Write a program that asks the user for two positive integers between 2 and 10 to use for the length and width of a rectangle. If the numbers are different, the larger of the two numbers should be used for the length and the smaller for the width. The program should then display a rectangle of this size on the screen using the character X. For example, if the user enters either 2 5 or 5 2, the program should display the following:
XXXXX
XXXXX
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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