Question: 2.20 LAB: Warm up: Basic output with variables This zyLab activity prepares a student for a full programming assignment. Warm up exercises are typically simpler
2.20 LAB: Warm up: Basic output with variables This zyLab activity prepares a student for a full programming assignment. Warm up exercises are typically simpler and worth fewer points than a foll programming assignment, and are wellsuited for an in-person scheduled lab meeting or as self-practice: A varable like userNum can store a value like an integer. Extend the given program as indicated: 1. Output the user's input ( 2 pts) 2 Output the input squared and cubed. Hint Compute squared as userNum * userNum. (2 pts) 3 Get a second user input into userNum2, and output the sum and product (1 pt) Note This zytab outputs a newine after each user.input prompt. for convenience in the examples below the user's input value is showin on the next line, but such values don' actually appear as output when the program runs Enter Intoger: 4 You entered: 4 4. aquared is 16 And 4 cubed in 6411 Enter another integer: 5 4+5:12745ln20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
