Question: C programming language Jojo and Lili want to play with a number. Jojo: What should we do to this number 2? Lili: Let's multiply it

C programming language

Jojo and Lili want to play with a number.

Jojo: "What should we do to this number 2?"

Lili: "Let's multiply it by 2! 2 is enough."

Jojo: "I think 4 is okay."

Lili: "No we should add 1 to it!"

Jojo: "Yeah! 5 is perfect"

You are given a number N with a value of 1 and then you must do Q process to the number.Each process you should multiply the number by 2 and then add 1 to it. Given Q process what is the value of N after Q processes.

Format Input: The input consists of one line containing an integer Q the number of processes.

Format Output: Output the value of N after Q processes.

Constraints: 0 <= Q <= 30

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!