Assignment 1
Assignment 1
a. 11 b. 5 c. 3 d. 9
a. False b. True c. 5 d. -1
a. 5 5 5 5 4 b. 5 5 5 5 c. 5 5 5 5 5 4 d. 5 5 5 4
5. Which of the following pseudo code will read a number and then print whether it’s Odd or Even
Number?
a. 1. Input x b. 1. Input x c. 1. Input x d. None of them
2. if x mod 2 = 0 2. if x mod 2 = 0 then 2. if x mod 2 =0 then
then Print “x is Odd” Print “x is Even” else
Print “x is Even” 3. Print “x is Even” Print “x is Odd”
3. Print “x is Odd” 4. end 3. end
4. end
1
6. What is the output for the following flowchart?
2
8. What is the output for the following flowchart?