003-005-002
Increment: Step Counter
Easy
Problem Description
Increment: Step Counter
In this problem, you will create a program that uses the increment operator (++) to count steps and determines whether the 10,000-step goal has been achieved, and displays the result to standard output.
Learning Objective: Accumulate values with increment operator
Simulate step counter. Increase count with ++ for each step and check goal achievement.
Input
Line 1: Steps (integer)
Output
Steps: [steps] steps
Goal achieved!
```java
Or
```java
Steps: [steps] steps
[10000-steps] steps remaining
Test Cases
※ Output examples follow programming industry standards
Normal case
Input:
12000
Expected Output:
Steps: 12000 steps Goal achieved!
Normal case
Input:
7500
Expected Output:
Steps: 7500 steps 2500 steps remaining
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 10 free executions remaining
