Set - 02 (loops) related problems
400 Problems
1. Write a program to print the numbers from 1 to 10 using a loop.
2. Write a program to find the sum of numbers from 1 to 100 using a loop.
3. Write a program to print even numbers from 1 to 20 using a loop.
4. Write a program to print odd numbers from 1 to 20 using a loop.
5. Write a program to print the multiplication table of a number using a loop.
6. Write a program to find the factorial of a number using a loop.
7. Write a program to print a series of Fibonacci numbers using a loop.
8. Write a program to check if a number is prime or not using a loop.
9. Write a program to reverse a number using a loop.
10. Write a program to calculate the sum of digits of a number using a loop.
11. Write a program to print the ASCII values of all alphabets using a loop.
12. Write a program to find the largest element in an array using a loop.
13. Write a program to find the smallest element in an array using a loop.
14. Write a program to count the number of positive and negative numbers in an array using a loop.
15. Write a program to calculate the average of numbers in an array using a loop.
16. Write a program to find the second largest element in an array using a loop.
17. Write a program to find the second smallest element in an array using a loop.
18. Write a program to check if an array is sorted in ascending order using a loop.
19. Write a program to check if an array is sorted in descending order using a loop.
20. Write a program to find the sum of all even numbers in an array using a loop.
21. Write a program to find the sum of all odd numbers in an array using a loop.
22. Write a program to find the product of all elements in an array using a loop.
23. Write a program to find the number of occurrences of an element in an array using a loop.
24. Write a program to remove duplicates from an array using a loop.
25. Write a program to find the largest prime factor of a number using a loop.
26. Write a program to check if a string is a palindrome using a loop.
27. Write a program to find the number of vowels in a string using a loop.
28. Write a program to count the number of words in a sentence using a loop.
29. Write a program to capitalize the first letter of each word in a sentence using a loop.
30. Write a program to reverse a string using a loop.
31. Write a program to check if a number is a perfect number using a loop.
32. Write a program to find the sum of all perfect numbers between 1 and 1000 using a loop.
33. Write a program to find the sum of the squares of all numbers between 1 and 50 using a loop.
34. Write a program to find the sum of the cubes of all numbers between 1 and 50 using a loop.
35. Write a program to convert a decimal number to binary using a loop.
36. Write a program to convert a decimal number to octal using a loop.
37. Write a program to convert a decimal number to hexadecimal using a loop.
38. Write a program to find the LCM of two numbers using a loop.
39. Write a program to find the GCD of two numbers using a loop.
40. Write a program to find the sum of all prime numbers between 1 and 100 using a loop.
41. Write a program to check if a string is a palindrome using a loop.
42. Write a program to count the number of vowels in a string using a loop.
43. Write a program to count the number of words in a sentence using a loop.
44. Write a program to capitalize the first letter of each word in a sentence using a loop.
45. Write a program to reverse a string using a loop.
46. Write a program to check if a number is a perfect number using a loop.
47. Write a program to find the sum of all perfect numbers between 1 and 1000 using a loop.
48. Write a program to find the sum of the squares of all numbers between 1 and 50 using a loop.
49. Write a program to find the sum of the cubes of all numbers between 1 and 50 using a loop.
50. Write a program to convert a decimal number to binary using a loop.
51. Write a program to convert a binary number to decimal using a loop.
52. Write a program to convert a binary number to octal using a loop.
53. Write a program to convert a binary number to hexadecimal using a loop.
54. Write a program to find the factorial of a number using a loop.
55. Write a program to check if a number is an Armstrong number using a loop.
56. Write a program to check if a year is a leap year using a loop.
57. Write a program to print the reverse of a number using a loop.
58. Write a program to find the sum of the digits of a number until the result is a single digit using a loop.
59. Write a program to check if a number is a palindrome using a loop.
60. Write a program to print the pattern:
*
***
*****
*******
*********
61. Write a program to print the pattern:
1
22
333
4444
55555
62. Write a program to print the pattern:
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
63. Write a program to print the pattern:
1
212
32123
4321234
543212345
64. Write a program to print a pyramid pattern with numbers:
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
65. Write a program to print a diamond pattern with numbers:
1
212
32123
4321234
543212345
66. Write a program to check if a number is a perfect square using a loop.
67. Write a program to find the sum of digits of a factorial using a loop.
68. Write a program to check if a number is a strong number using a loop.
69. Write a program to check if a number is a neon number using a loop.
70. Write a program to find the sum of Fibonacci series using a loop.
71. Write a program to find the sum of all numbers divisible by 3 and 5 between 1 and 100 using a loop.
72. Write a program to print the pattern:
1
121
12321
1234321
123454321
73. Write a program to find the sum of the digits of a number until the sum is a single digit using a loop.
74. Write a program to check if a number is a happy number using a loop.
75. Write a program to find the HCF (Highest Common Factor) of two numbers using a loop.
76. Write a program to find the LCM (Least Common Multiple) of two numbers using a loop.
77. Write a program to check if a number is a Smith number using a loop.
78. Write a program to find the first n prime numbers using a loop.
79. Write a program to print all the prime numbers between 1 and 100 using a loop.
80. Write a program to find the sum of all prime numbers between 1 and 1000 using a loop.
81. Write a program to find the sum of the digits of a number using a loop, without using any library function or recursion.
82. Write a program to reverse a sentence without reversing the individual words using a loop.
83. Write a program to print the pascal's triangle using a loop.
84. Write a program to find the number of digits in a given number using a loop.
85. Write a program to find the sum of Fibonacci series up to a specific number using a loop.
86. Write a program to find the factorial of a number using recursion and a loop.
87. Write a program to find the sum of the squares of the first n natural numbers using a loop.
88. Write a program to find the sum of the cubes of the first n natural numbers using a loop.
89. Write a program to find the sum of the alternate digits of a number using a loop.
90. Write a program to find the sum of the digits of a number using recursion and a loop.
91. Write a program to convert a decimal number to a hexadecimal number using a loop.
92. Write a program to convert a decimal number to a binary number using recursion and a loop.
93. Write a program to convert a decimal number to an octal number using recursion and a loop.
94. Write a program to find the factorial of a number using recursion and a loop.
95. Write a program to check if a number is a palindrome using recursion and a loop.
96. Write a program to find the sum of the digits of a number until the result is a single digit using recursion and a loop.
97. Write a program to reverse a string using recursion and a loop.
98. Write a program to find the sum of digits of a factorial using recursion and a loop.
99. Write a program to check if a number is a strong number using recursion and a loop.
100. Write a program to check if a number is a neon number using recursion and a loop.
101. Write a program to check if a number is a palindrome using recursion and a loop.
102. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop.
103. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop.
104. Write a program to check if a number is a Smith number using recursion and a loop.
105. Write a program to find the first n prime numbers using recursion and a loop.
106. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop.
107. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop.
108. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function.
109. Write a program to reverse a sentence without reversing the individual words using recursion and a loop.
110. Write a program to print the Pascal's triangle using recursion and a loop.
111. Write a program to find the number of digits in a given number using recursion and a loop.
112. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop.
113. Write a program to find the factorial of a number using recursion and a loop, without using the * operator.
114. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop.
115. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop.
116. Write a program to find the sum of the alternate digits of a number using recursion and a loop.
117. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop.
118. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop.
119. Write a program to convert a decimal number to a binary number using recursion and a loop.
120. Write a program to convert a decimal number to an octal number using recursion and a loop.
121. Write a program to find the factorial of a number using recursion and a loop, without using the * operator and using only a single loop.
122. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string.
123. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator.
124. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator.
125. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function.
126. Write a program to find the first n prime numbers using recursion and a loop, without using any library function.
127. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function.
128. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function.
129. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function.
130. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function.
131. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function.
132. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function.
133. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function.
134. Write a program to find the factorial of a number using recursion and a loop, without using any library function or recursion.
135. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function.
136. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function.
137. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function.
138. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n).
139. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function.
140. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function.
141. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function.
142. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function.
143. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function.
144. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function.
145. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function.
146. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures.
147. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures.
148. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures.
149. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
150. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures.
151. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures.
152. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures.
153. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures.
154. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures.
155. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures.
156. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
157. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
158. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures.
159. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n), without using any library function or any additional data structures.
160. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
161. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function or any additional data structures.
162. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function or any additional data structures.
163. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function or any additional data structures.
164. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function or any additional data structures.
165. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures.
166. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function or any additional data structures.
167. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures.
168. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures.
169. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures.
170. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
171. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures.
172. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures.
173. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures.
174. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures.
175. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures.
176. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures.
177. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
178. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
179. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures.
180. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n), without using any library function or any additional data structures.
181. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
182. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function or any additional data structures.
183. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function or any additional data structures.
184. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function, and with a time complexity of O(n).
185. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function or any additional data structures.
186. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
187. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
188. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)^2).
189. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
190. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
191. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^3log(n)).
192. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
193. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
194. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
195. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
196. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
197. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures, and with a time complexity of O(n).
198. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
199. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
200. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
201. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
202. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
203. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
204. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function or any additional data structures, and with a time complexity of O(n).
205. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function or any additional data structures, and with a time complexity of O(log(n)).
206. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
207. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
208. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)^2).
209. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
210. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
211. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^3log(n)).
212. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
213. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
214. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
215. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
216. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
217. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures, and with a time complexity of O(n).
218. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
219. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
220. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
221. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
222. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
223. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
224. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function or any additional data structures, and with a time complexity of O(n).
225. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function or any additional data structures, and with a time complexity of O(log(n)).
226. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
227. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function or any additional data structures, and with a time complexity of O(log(min(a,b))).
228. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)^2).
229. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
230. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2log(n)).
231. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^3log(n)).
232. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
233. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
234. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n^2).
235. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
236. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
237. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures, and with a time complexity of O(n).
238. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
239. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
240. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
241. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures.
242. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
243. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures.
244. Write a program to find the sum of all odd numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures.
245. Write a program to find the sum of all even numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
246. Write a program to find the sum of squares of all odd numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures.
247. Write a program to find the sum of cubes of all even numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
248. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
249. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
250. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
251. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
252. Write a program to find the sum of all odd numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
253. Write a program to find the sum of all even numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
254. Write a program to find the sum of squares of all odd numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
255. Write a program to find the sum of cubes of all even numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n).
256. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
257. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
258. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
259. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
260. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
261. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
262. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
263. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
264. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
265. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
266. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
267. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
268. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
269. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(sqrt(n)).
270. Write a program to find the sum of all perfect numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(n*sqrt(n)).
271. Write a program to find the sum of even Fibonacci numbers up to a specific number using recursion and a loop, without using any library function or any additional data structures.
272. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures, and with a time complexity of O(log(n)).
273. Write a program to find the sum of the digits of a number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures.
274. Write a program to find the product of the digits of a number using recursion and a loop, without using any library function or any additional data structures.
275. Write a program to find the sum of natural numbers using recursion and a loop, without using any library function or any additional data structures.
276. Write a program to find the sum of the squares of the first n even numbers using recursion and a loop, without using any library function or any additional data structures.
277. Write a program to find the sum of the cubes of the first n odd numbers using recursion and a loop, without using any library function or any additional data structures.
278. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures.
279. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n), without using any library function or any additional data structures.
280. Write a program to convert a decimal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
281. Write a program to convert a decimal number to a binary number using recursion and a loop, without using any library function or any additional data structures.
282. Write a program to convert a decimal number to an octal number using recursion and a loop, without using any library function or any additional data structures.
283. Write a program to find the factorial of a number using recursion and a loop, without using the * operator, recursion, or any library function or any additional data structures.
284. Write a program to check if a number is a palindrome using recursion and a loop, without converting the number to a string and without using any library function or any additional data structures.
285. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures.
286. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and a loop, without using the / operator or any library function or any additional data structures.
287. Write a program to check if a number is a Smith number using recursion and a loop, without using any library function or any additional data structures.
288. Write a program to find the first n prime numbers using recursion and a loop, without using any library function or any additional data structures.
289. Write a program to print all the prime numbers between 1 and 100 using recursion and a loop, without using any library function or any additional data structures.
290. Write a program to find the sum of all prime numbers between 1 and 1000 using recursion and a loop, without using any library function or any additional data structures.
291. Write a program to find the sum of the digits of a number using recursion and a loop, without using any library function or any additional data structures.
292. Write a program to reverse a sentence without reversing the individual words using recursion and a loop, without using any library function or any additional data structures.
293. Write a program to print the Pascal's triangle using recursion and a loop, without using any library function or any additional data structures.
294. Write a program to find the number of digits in a given number using recursion and a loop, without using any library function or any additional data structures.
295. Write a program to find the sum of Fibonacci series up to a specific number using recursion and a loop, without using any library function or any additional data structures.
296. Write a program to find the factorial of a number using recursion and a loop, without using any library function, recursion, or any additional data structures.
297. Write a program to find the sum of the squares of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
298. Write a program to find the sum of the cubes of the first n natural numbers using recursion and a loop, without using any library function or any additional data structures.
299. Write a program to find the sum of the alternate digits of a number using recursion and a loop, without using any library function or any additional data structures.
300. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n), without using any library function or any additional data structures.
301. Write a program to check if a number is a perfect number using recursion and a loop, without using any library function or any additional data structures.
302. Write a program to find the HCF (Highest Common Factor) of two numbers using recursion and a loop, without using the % operator or any library function or any additional data structures.
303. Write a program to check if a number is a Harshad number using recursion and a loop, without using any library function or any additional data structures.
304. Write a program to check if a number is a strong number using recursion and a loop, without using any library function or any additional data structures.
305. Write a program to check if a number is a Armstrong number using recursion and a loop, without using any library function or any additional data structures.
306. Write a program to find the highest digit in a number using recursion and a loop, without using any library function or any additional data structures.
307. Write a program to find the lowest digit in a number using recursion and a loop, without using any library function or any additional data structures.
308. Write a program to find if a number is a palindrome number using recursion and a loop, without using any library function or any additional data structures.
309. Write a program to find if a number is a palindrome number in a specific base (binary, octal or hexadecimal) using recursion and a loop, without using any library function or any additional data structures.
310. Write a program to find the sum of the digits of a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
311. Write a program to find the sum of the digits of a binary number using recursion and a loop, without using any library function or any additional data structures.
312. Write a program to find the sum of the digits of an octal number using recursion and a loop, without using any library function or any additional data structures.
313. Write a program to find the sum of the digits of a hexadecimal number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures.
314. Write a program to find the sum of the digits of a binary number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures.
315. Write a program to find the sum of the digits of an octal number until the sum becomes a single digit using recursion and a loop, without using any library function or any additional data structures.
316. Write a program to find the sum of the digits of a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
317. Write a program to print a given number in words using recursion and a loop, without using any library function or any additional data structures.
318. Write a program to find the sum of the squared digits of a number using recursion and a loop, without using any library function or any additional data structures.
319. Write a program to find the sum of the cubes of the digits of a number using recursion and a loop, without using any library function or any additional data structures.
320. Write a program to find the sum of the digits of a number using recursion and a loop, using only a single loop and with a time complexity of O(log n), without using any library function or any additional data structures.
321. Write a program to check if a number is a palindrome number with an even number of digits using recursion and a loop, without using any library function or any additional data structures.
322. Write a program to find the sum of the factorial of each digit in a number using recursion and a loop, without using any library function or any additional data structures.
323. Write a program to check if a number is a narcissistic number using recursion and a loop, without using any library function or any additional data structures.
324. Write a program to check if a number is a magic number using recursion and a loop, without using any library function or any additional data structures.
325. Write a program to check if a number is a buzz number using recursion and a loop, without using any library function or any additional data structures.
326. Write a program to find the highest prime factor of a number using recursion and a loop, without using any library function or any additional data structures.
327. Write a program to find the lowest prime factor of a number using recursion and a loop, without using any library function or any additional data structures.
328. Write a program to perform binary addition of two numbers using only bitwise operators and a loop, without using any library function or any additional data structures.
329. Write a program to perform binary subtraction of two numbers using only bitwise operators and a loop, without using any library function or any additional data structures.
330. Write a program to perform binary multiplication of two numbers using only bitwise operators and a loop, without using any library function or any additional data structures.
331. Write a program to perform binary division of two numbers using only bitwise operators and a loop, without using any library function or any additional data structures.
332. Write a program to find the decimal equivalent of a binary number using recursion and a loop, without using any library function or any additional data structures.
333. Write a program to find the binary equivalent of a decimal number using recursion and a loop, without using any library function or any additional data structures.
334. Write a program to find the decimal equivalent of an octal number using recursion and a loop, without using any library function or any additional data structures.
335. Write a program to find the octal equivalent of a decimal number using recursion and a loop, without using any library function or any additional data structures.
336. Write a program to find the hexadecimal equivalent of a decimal number using recursion and a loop, without using any library function or any additional data structures.
337. Write a program to find the decimal equivalent of a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
338. Write a program to convert a binary number to an octal number using recursion and a loop, without using any library function or any additional data structures.
339. Write a program to convert an octal number to a binary number using recursion and a loop, without using any library function or any additional data structures.
340. Write a program to convert a binary number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
341. Write a program to convert a hexadecimal number to a binary number using recursion and a loop, without using any library function or any additional data structures.
342. Write a program to convert an octal number to a hexadecimal number using recursion and a loop, without using any library function or any additional data structures.
343. Write a program to convert a hexadecimal number to an octal number using recursion and a loop, without using any library function or any additional data structures.
344. Write a program to find the factorial of a number using recursion and memoization technique, without using the * operator or any additional data structures.
345. Write a program to check if a number is a palindrome number using recursion and memoization technique, without converting the number to a string or any additional data structures.
346. Write a program to check if a number is a prime number using recursion and memoization technique, without using any library function or any additional data structures.
347. Write a program to find the sum of Fibonacci series up to a specific number using recursion and memoization technique, without using any library function or any additional data structures.
348. Write a program to find the sum of the digits of a number using recursion and memoization technique, without using any library function or any additional data structures.
349. Write a program to reverse a sentence without reversing the individual words using recursion and memoization technique, without using any library function or any additional data structures.
350. Write a program to check if a number is a perfect number using recursion and memoization technique, without using any library function or any additional data structures.
351. Write a program to find the GCD (Greatest Common Divisor) of two numbers using recursion and memoization technique, without using any library function or any additional data structures.
352. Write a program to find the LCM (Least Common Multiple) of two numbers using recursion and memoization technique, without using any library function or any additional data structures.
353. Write a program to check if a number is a Harshad number using recursion and memoization technique, without using any library function or any additional data structures.
354. Write a program to find the sum of the digits of a number until the sum becomes a single-digit number using recursion and memoization technique, without using any library function or any additional data structures.
355. Write a program to find the Armstrong numbers in a given range using recursion and memoization technique, without using any library function or any additional data structures.
356. Write a program to find the number of trailing zeroes in the factorial of a number using recursion and memoization technique, without calculating the actual factorial or using any library function or any additional data structures.
357. Write a program to find the HCF (Highest Common Factor) of two numbers using recursion and memoization technique, without using any library function or any additional data structures.
358. Write a program to convert a decimal number to a binary number using recursion and memoization technique, without using any library function or any additional data structures.
359. Write a program to convert a decimal number to an octal number using recursion and memoization technique, without using any library function or any additional data structures.
360. Write a program to convert a decimal number to a hexadecimal number using recursion and memoization technique, without using any library function or any additional data structures.
361. Write a program to convert a binary number to a decimal number using recursion and memoization technique, without using any library function or any additional data structures.
362. Write a program to convert an octal number to a decimal number using recursion and memoization technique, without using any library function or any additional data structures.
363. Write a program to convert a hexadecimal number to a decimal number using recursion and memoization technique, without using any library function or any additional data structures.
364. Write a program to convert a binary number to an octal number using recursion and memoization technique, without using any library function or any additional data structures.
365. Write a program to convert an octal number to a binary number using recursion and memoization technique, without using any library function or any additional data structures.
366. Write a program to convert a binary number to a hexadecimal number using recursion and memoization technique, without using any library function or any additional data structures.
367. Write a program to convert a hexadecimal number to a binary number using recursion and memoization technique, without using any library function or any additional data structures.
368. Write a program to convert an octal number to a hexadecimal number using recursion and memoization technique, without using any library function or any additional data structures.
369. Write a program to convert a hexadecimal number to an octal number using recursion and memoization technique, without using any library function or any additional data structures.
370. Write a program to count the number of vowels present in a string using recursion and memoization technique, without using any library function or any additional data structures.
371. Write a program to count the number of consonants present in a string using recursion and memoization technique, without using any library function or any additional data structures.
372. Write a program to find the sum of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
373. Write a program to find the product of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
374. Write a program to find the largest element in an array using recursion and memoization technique, without using any library function or any additional data structures.
375. Write a program to find the smallest element in an array using recursion and memoization technique, without using any library function or any additional data structures.
376. Write a program to reverse an array using recursion and memoization technique, without using any library function or any additional data structures.
377. Write a program to check if an array is sorted in ascending order using recursion and memoization technique, without using any library function or any additional data structures.
378. Write a program to check if an array is sorted in descending order using recursion and memoization technique, without using any library function or any additional data structures.
379. Write a program to remove duplicates from an array using recursion and memoization technique, without using any library function or any additional data structures.
380. Write a program to find the sum of all even numbers in an array using recursion and memoization technique, without using any library function or any additional data structures.
381. Write a program to find the sum of all odd numbers in an array using recursion and memoization technique, without using any library function or any additional data structures.
382. Write a program to find the count of even numbers in an array using recursion and memoization technique, without using any library function or any additional data structures.
383. Write a program to find the count of odd numbers in an array using recursion and memoization technique, without using any library function or any additional data structures.
384. Write a program to find the number of occurrences of an element in an array using recursion and memoization technique, without using any library function or any additional data structures.
385. Write a program to find the second largest element in an array using recursion and memoization technique, without using any library function or any additional data structures.
386. Write a program to find the second smallest element in an array using recursion and memoization technique, without using any library function or any additional data structures.
387. Write a program to find the sum of all prime numbers in an array using recursion and memoization technique, without using any library function or any additional data structures.
388. Write a program to find the sum of all even elements at even positions in an array using recursion and memoization technique, without using any library function or any additional data structures.
389. Write a program to find the sum of all odd elements at odd positions in an array using recursion and memoization technique, without using any library function or any additional data structures.
390. Write a program to find the sum of all elements at even positions in an array using recursion and memoization technique, without using any library function or any additional data structures.
391. Write a program to find the sum of all elements at odd positions in an array using recursion and memoization technique, without using any library function or any additional data structures.
392. Write a program to find the sum of the digits of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
393. Write a program to find the average of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
394. Write a program to find the maximum and minimum product of two elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
395. Write a program to calculate the sum of the elements after excluding the largest and smallest elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
396. Write a program to find the longest consecutive subsequence in an array using recursion and memoization technique, without using any library function or any additional data structures.
397. Write a program to find the largest even sum subarray in an array using recursion and memoization technique, without using any library function or any additional data structures.
398. Write a program to find the smallest odd sum subarray in an array using recursion and memoization technique, without using any library function or any additional data structures.
399. Write a program to find the count of elements that are larger than the average of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
400. Write a program to find the count of elements that are smaller than the average of all elements in an array using recursion and memoization technique, without using any library function or any additional data structures.
Comments