Course Solutions Uncategorized (Solved) : Ex 4 Basic Programming Let Sequence Unlnze Integers Defined Uo Ui Ui Even Ui 1 3u 1 U Odd Q30500244 . . . .

(Solved) : Ex 4 Basic Programming Let Sequence Unlnze Integers Defined Uo Ui Ui Even Ui 1 3u 1 U Odd Q30500244 . . . .

 

Ex. 4-Basic programming Let the sequence (unlnze of integers be defined by uo = a Ui, if ui is even ui+1 3u 1 if u; is odd 1. Write a function which prompts the user for a and determines N such that UN 1 2. Write a function which prompts the user for a value M, and returns A, the value of 2 a M, such that N is maximized. Specifications Input: two lines, the first one being 1 or 2 for the function from question 1 or 2, respectively, and an integer corresponding to a or M on the second one; Output: one line showing the result;

Ex.

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post