Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 03 Numbers Squared and Rotated! Objective: Write a program that prompts the user for a 4-digit whole number (we assume the users will enter

Lab 03

Numbers Squared and Rotated!

Objective:

Write a program that prompts the user for a 4-digit whole number (we assume the users will enter this correctly) and then displays it squared! No, not the mathematical squaring. This will make a square box of the numbers! WHOA! The top is the number, the left-hand side is the number but going down, the bottom is the number reversed, and the right hand side is the number going up. Also once the number is squared it is rotated clockwise by one space, and then again. HINT: While it seems like this should be stored as a numeric value (int or double) it may make more sense to store it as a String and use String methods.

Example Dialog:

Enter a 4-digit number

1234

The number squared is:

1234

2 3

3 2

4321

The number squared rotated clockwise one space is:

2123

3 4

4 3

3212

The number squared rotated clockwise again is:

3212

4 3

3 4

2123

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Power Of Numbers In Health Care A Students Journey In Data Analysis

Authors: Kaiden

1st Edition

8119747887, 978-8119747887

More Books

Students also viewed these Databases questions