Question Bank - Looping
Question Bank - Looping
43. WAP to input a No and find the smallest no formed from the No.
44. WAP to input a No. and find the largest no formed from the No.
45. WAP to input a no and check whether it is Armstrong No not
46. WAP to input a no and check whether it is special on not.
47. WAP to input a no check whether it is automophic on not
48. WAP to input a no and check whether it is Magic no on not.
49. WAP to input on and check whether it is a sunny no or not.
( Square root (N+1) = An interger)
50. WAP to input a No and fid the frequency of each digit of a No.
51. WAP to print all the prime nos between 1 to 100.
52. WAP to print all the perfect nos betwen 1 to 100
53.. WAP to print all the special Nos between 10 to 500000.
54. WAP to print all the special No between 11 to n
55. WAP to print all the armstrong Nos between 1 to 500
56. Print the summery magic nos between 1 to n
57. Print the summery nos between 1 to 200000
58. WAP to print the Pythagorean triplets between 1 to 100.
(sum of square of tow successive nos is equal to the third one ) 32 + 44 = 52
59. WAP to input a no and check whether it is
60. Prime palindrome nos between 1 to 500. by
61. WAP to print the following series
1, 2, 3, 4.................................................upto 10.
62. 11, 12, 13................................................upto 50
63. 1, 3, 5, 7................................................upto 20
64. 1, 3, 5, 7................................................upto 20 terms
65. 2, 4, 6, 8................................................upto 15
66. 2, 4, 6, 8................................................upto 20 terms
67. 11, 13, 15,................................................upto 50 terms
68. 42, 44,46................................................upto 100 terms
69. 10, 9, 8, 7................................................upto 1
70. 100, 99, 98,................................................upto 50
71. 1, 4, 9, 16................................................upto 20 terms
72. 1, 8, 27,64................................................upto 20 terms
73. 0, 3, 8, 15................................................upto 25 terms
74. 2, 5, 10, 17................................................upto 25 terms
75. 1, 2, 4, 8,16................................................upto 30 terms
76. 1, 5, 25,1257................................................upto 20 terms
77. 3, 6, 9, 12................................................upto 20 terms
78. 4, 8, 12, 16................................................upto 20 terms
79. 12, 24, 36................................................upto 40 terms
80. 100, 5000 , 2500 .........................................upto 250.
81. 2, 4, 8, 16................................................upto 20 terms
82. 100. 97, 94, 91 ..................................... upto 10.
83. 1 + 2 + 3 + 4.................................... upto 20 sum of series
84. 11 +12 +13 + 14.................................upto 50
85. 1 + 3 + 5 + 7 ................................................upto 50 terms
86. 2 + 4 + 6 + 8 ................................................upto 99 terms
87. 1 + 7 + 13 + 19 ................................................upto 25 terms
88. 1 + 4 + 9 + 16 ................................................upto 25 terms
89. 1 + 8 + 27 + 64 ................................................upto 25 terms
90. 0 + 3 + 8 + 15 ................................................upto 20 terms
91. 2 + 5 + 10 + 17 ................................................upto 25 terms
92. 1+ x + x2 + x3 + x4.............................................x16
93. 1+ x + x2 + x3 + x4.............................................xn
94. 1! + 2! + 3! + 4! .............................................n!
1 1 1 1
95. 1+ + 2 + 3 + 4 .......................... 1n
x x x x x
1 1 1
96. 1+ x2 + 4 + 4 +................................. 1n
x x x
1
97. + 1 + 1 +................................ 1
1! 2! 3! n!
2
x x 3
x 4
xn
98. 1! + 2! + 3! ................................. (n-1)!
x x2 x3 x4 xn
99. 2! + + + +.......................
3! 4! 5! (n-1)!
100. 1 2 3 × 4........................................n terms
101. 1 3 5 7........................................n terms
x2 x4 x6 +........................x
102.1 + + –
2! 4! 6!
103.1 – 3 – 4 + 5.......................................n
104..1– 3 +5 –7 +9......................................n
x3 5
+ x + x +..........................x
7
105. x –
3! 5! 7!
106. 1, 11, 121, 1331, 14641.......................n
108.1 + 22 + 33 + 44...............................nn
110. 2 – 4 – 6 – 8 +10...........................N
116. 1231491 1681 1256 6561 1 65536 43046721 sum of all above terms in the
series is 4339194
117. WAP to print the cube of all non prime numbers fill x.
119. count how may zero's are there in a no internal by the uses.
120. Accept x numbers from the user and count how many re negative, positive and
zeroes.
121. A right 10 nos from the user and final the smallest and the largest no internal by
the user.
123. Accept 50 nos flame the user and count how may belong to which group.
124. Check the nature of the no eternal by the user ( Single digit double light .......)
127. Print the integers that has largest no factors between 1 to 10000.
129. Print the average of all even nos and factorial of add numbers out of 50
numbers entered by the uses.
134. 135
136. 137.
138. 149.
140. a a a a a a a a
a a a a a a
a a a a
a a
1 1
141. 142.
1 1 2 2
1 2 3 3 3 3
1 2 3 4 4 4 4 4
1 2 3 4 5 5 5 5 5 5
143. 144.
1 2 3 4 5
1 1 2 3 4
2 3 12 2
4 5 6 12
7 8 9 10 1
145. 146.
1 2 3 4 5 5 4 3 2 1
2 3 4 5 4 3 2 1
3 4 5 3 1 1
5 5 2 1
6 1
147. 148. 1 1 2 3 4 5 5 4 3 2 1
2 1 1 2 3 4 4 3 2 1
3 2 1 1 2 3 3 2 1
4 3 2 1 1 2 2 1
5 4 3 2 1 1 1
149. 150.
5 4 3 2 1
1
4 3 2 1
1 2
3 2 1
1 2 1
2 1
1 3 3 1
1
1 4 6 4 1
5
151. 152. 4 3 2 1 15 14 13 12 11
5 4 3 2 10 9 8 7
5 4 3 6 5 4
5 4 3 1
5 1
153. 1154.2 3 4 5 5 4 3 2 1
1
1 2 3 4 4 3 2 1
1 2 1
1 2 3 3 2 1
1 2 3 2 1
1 2 2 1
1 2 3 4 3 1 1
1 1
1 2 2 4 5 4 3 2 1
1 2 2 1
1 2 3 3 2 1
1 2 3 4 4 3 2 1
1 2 3 4 5 5 4 3 2 1
155. 156. 9 8 7 6
0
1 0 1 5 4 3
1 2 0 2 1 2 1
1 2 3 0 3 1 1 0
1 2 2 4 0 4 3 2 1