(3) Extend to get a second user input into userNum2. Output sum and product. (1 pt) Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!!! Enter another integer: 4 5 is 9 4 5 is 20 LAB 1.16.1: LAB: Warm up: Basic output with variables 2/5 АCTIVITY main.cpp Load default template... 1 #include

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
100%

I keep getting an error message, What is wrong with my code. Please

(3) Extend to get a second user input into userNum2. Output sum and product. (1 pt)
Enter integer:
4
You entered: 4
4 squared is 16
And 4 cubed is 64!!!
Enter another integer:
4 5 is 9
4 5 is 20
LAB
1.16.1: LAB: Warm up: Basic output with variables
2/5
АCTIVITY
main.cpp
Load default template...
1 #include <iostream
2 using namespace std;
3
4 int main) {
int userNum;
int userNum2;
5
6
7
cout < "Enter integer:" << endl;
cin userNum;
cout <"Enter integer:" << endl
cin userNum2;
8
9
10
11
12
13
Type your code here *
cout < "You entered: 4" << endl;
cout <"4 squared is 16" << endl;
cout <"And 4 cubed is 64!" << endl
cout "Enter another integer:" < endl;
cout <"You entered: 5" <<endl;
cout <"4 5 is 9" <<endl
cout <"4 * 5 is 28" < endl;
14
15
16
17
18
19
20
--
Transcribed Image Text:(3) Extend to get a second user input into userNum2. Output sum and product. (1 pt) Enter integer: 4 You entered: 4 4 squared is 16 And 4 cubed is 64!!! Enter another integer: 4 5 is 9 4 5 is 20 LAB 1.16.1: LAB: Warm up: Basic output with variables 2/5 АCTIVITY main.cpp Load default template... 1 #include <iostream 2 using namespace std; 3 4 int main) { int userNum; int userNum2; 5 6 7 cout < "Enter integer:" << endl; cin userNum; cout <"Enter integer:" << endl cin userNum2; 8 9 10 11 12 13 Type your code here * cout < "You entered: 4" << endl; cout <"4 squared is 16" << endl; cout <"And 4 cubed is 64!" << endl cout "Enter another integer:" < endl; cout <"You entered: 5" <<endl; cout <"4 5 is 9" <<endl cout <"4 * 5 is 28" < endl; 14 15 16 17 18 19 20 --
main.cpp
(Your program)
Output (shown below)
Run program
Input (from above)
Program output displayed here
Enter integer:
Enter integer:
You entered: 4
4 squared is 16
And 4 cubed is 64!
Enter another integer:
You entered: 5
4 5 is 9
4 5 is 20
Feedback?
Transcribed Image Text:main.cpp (Your program) Output (shown below) Run program Input (from above) Program output displayed here Enter integer: Enter integer: You entered: 4 4 squared is 16 And 4 cubed is 64! Enter another integer: You entered: 5 4 5 is 9 4 5 is 20 Feedback?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Encryption and decryption
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr