Page 266 - CA_Blue( J )_Class9
P. 266
D. Assertion and Reasoning based question.
Assertion(A): The same as the break statement, continue can also be used in a nested loop.
Reason(R): However, the continue statement does not work the opposite of the break statement.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
(c) Assertion (A) is true and Reason (R) is false.
(d) Assertion (A) is false and Reason (R) is true.
21 st #Problem Solving & Logical Reasoning
E. More unsolved programs Century #Interdisciplinary
Skills
1. Write a program to input n numbers and print all the prime numbers.
2. Write a program to print all the Armstrong Numbers between 200 to 1000.
[Armstrong number is a number that is equal to the sum of cubes of its digits. For example, 0, 1, 153, 370, 371 and
407 are the Armstrong numbers.]
3. Write a program to print all the palindromic numbers between m and n (m<n). i j i+j
[A palindromic number is a number whose reverse of the digits is equal to the
number. 1 2 3
1 2
Ex. 121, 454, 66, etc.] 2 2 4
4. Write a program to “n” numbers and print the sum of all the Niven Numbers. 1 3
[A Niven number is an integer number divisible by the sum of its digit. For example, 3 2 5
111 as 111 is divisible by 3 (sum of the digits).] 1 4
5. Write a program to print the sum of the following series:
s= 1/2! + 2/4! + 3/4! +…… 10/20!
6. Write a program to print the following series:
s = 1+ (1+3) + (1+3+5) +……+(1+3+5+…. + nth term)
7. Write a program to print the following patterns.
a. 1 b. 1111 c. 10 9 87 d. 1
2 3 222 6 5 4 2 1
4 5 6 33 3 2 3 2 1
7 8 9 10 4 1 4 3 2 1
e. 1 f. 11111 g. xxxx h. A
2 2 11111 xxx B C
3 3 3 11111 xx D E F
4 4 4 4 11111 x G H I J
5 5 5 5 5 11111
264 Touchpad Computer Applications-IX

