Question: Have int variables to store the length, width, and area of the rectangle Prompt the user for the integer length of the rectangle and store
Have int variables to store the length, width, and area of the rectangle Prompt the user for the integer length of the rectangle and store the value in the appropriate variable Prompt the user for the integer width of the rectangle and store the value in the appropriate variable Calculate the area of the rectangle and store it in an appropriate variable Test if the length and width are the same value o If they are the same, output to the user that this is a square and its area o If they are not the same, output to the user that this is a rectangle and its area Be sure to add in appropriate, descriptive comments in the code regarding functionality using single line comments // and /or multiline comments /* */ Be sure to include your name as a comment at the very top of your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
