001-004-007

Variable Value Update: Point Update

Easy

Problem Description

variable Value Update: Point Update

In this problem, you will create a program that stores points in an int variable, updates it twice using += with shopping trip earnings, and displays the current total at each step in a card format to standard output.

Learning Objective: Understand how to change variable values later

Create a point card app. Input your initial points and add points from two shopping trips. Display points after each shopping trip.

Input

Line 1: Initial points (integer, pt)
Line 2: Points earned from first shopping trip (integer, pt)
Line 3: Points earned from second shopping trip (integer, pt)

Output

================================
     Point Update Card
================================
Initial Points: [initial points]pt
After 1st Shopping: [updated points]pt
After 2nd Shopping: [final points]pt
================================
```java

## Examples

### Example 1: 100pt plus 50pt and 30pt
Input:
```java
100
50
30
```java
Output:
```java
================================
     Point Update Card
================================
Initial Points: 100pt
After 1st Shopping: 150pt
After 2nd Shopping: 180pt
================================

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up