Workbook 5.5
From the Java Bootcamp Resources
, launch Workbook 5.5
.
Counter Tool revisited.
Your app should let the user choose:
-
the steps to count by.
-
a number to count from.
-
a number to count until.
Your program will count from the second number to the third number, in steps of the first.
Task 1 - Get integers from the user.
You'll ask the user three questions:
1. Pick a number to count by: <number>
2. Pick a number to start counting from: <number>
3. Pick a number to count to: <number>
The user will submit his answer BESIDE each question:
Task 2 - Write a loop
Make a for
loop that:
-
starts from the second number.
-
stops at the third number.
-
counts in steps of the first.
Then, print your count in ONE line.
Visualizing the Runtime
After you solve this workbook, I still recommend watching the video solution on Udemy.
It will show you how to visualize the runtime using Visual Studio Code.