001-002-008
Variable Assignment: Point Card Calculation
Easy
Problem Description
Variable Assignment: Point Card Calculation
Learning Objective: Understand variable assignment operations and store calculation results in new variables
Create a program that calculates shopping points. When you input the purchase amount, it calculates and displays points (10% of purchase amount).
Input
Line 1: Purchase amount (integer, yen)
Output
================================
Point Card
================================
Purchase Amount: [amount] yen
Earned Points: [points] pt
================================
Examples
Example 1: 1000 yen Purchase
Input:
1000
Output:
================================
Point Card
================================
Purchase Amount: 1000 yen
Earned Points: 100 pt
================================
Example 2: 2500 yen Purchase
Input:
2500
Output:
================================
Point Card
================================
Purchase Amount: 2500 yen
Earned Points: 250 pt
================================
Example 3: 100 yen Purchase
Input:
100
Output:
================================
Point Card
================================
Purchase Amount: 100 yen
Earned Points: 10 pt
================================
❌ Some tests failed
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 6 free executions remaining
