001-002-020
Variable Assignment and Reassignment
Easy
Problem Description
variable Assignment and Reassignment
In this problem, you will create a program that assigns and reassigns values to an int variable x, displaying its value at each step to standard output.
Learning Objective: Understand how variable assignment and reassignment works
Overview
Variables can be assigned new values repeatedly. Reassignment replaces the previous value.
Specifications
- Assign 10 to int variable x and display
- Reassign 20 to x and display
- Assign x + 5 to x and display
Output Format
x = 10
x = 20
x = 25
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