3 ☐ ☐ ☐ ☐ Write a for loop that iterates 6 times. Each iteration: Put userNum to output. Then, put "-" to output. Then, assign userNum with userNum multiplied by 4. Ex: If input is 2, then output is: 2-8-32-128-512-2048- 1 integer userNum 2 integer i 3 4 // Program will be tested with inputs: 2 and 3 5 userNum = Get next input 6 7 Variables Not shown when editing 8 Your solution goes here 9 Code Flowchart 4
3 ☐ ☐ ☐ ☐ Write a for loop that iterates 6 times. Each iteration: Put userNum to output. Then, put "-" to output. Then, assign userNum with userNum multiplied by 4. Ex: If input is 2, then output is: 2-8-32-128-512-2048- 1 integer userNum 2 integer i 3 4 // Program will be tested with inputs: 2 and 3 5 userNum = Get next input 6 7 Variables Not shown when editing 8 Your solution goes here 9 Code Flowchart 4
Chapter5: Looping
Section: Chapter Questions
Problem 13RQ
Related questions
Question

Transcribed Image Text:3
☐ ☐ ☐ ☐
Write a for loop that iterates 6 times. Each iteration: Put userNum to output. Then, put "-" to output. Then,
assign userNum with userNum multiplied by 4.
Ex: If input is 2, then output is:
2-8-32-128-512-2048-
1 integer userNum
2 integer i
3
4 // Program will be tested with inputs: 2 and 3
5 userNum = Get next input
6
7
Variables
Not shown when editing
8 Your solution goes here
9
Code Flowchart
4
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning