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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started