Skip to main content

PRACTICE QUESTIONS SET 6(LOOPING)


LIST OF PROGRAMS


101.    1*3*5*7……………………….n terms
102.
103.    1-2+3-4+5……………………….n terms
104.    1-3+5-7+9……………………….n
105.
106.    1,11,121,1331,14641……………………….n
107.    1,10,100,1000……………………….n
108.    1+22+33+44……………………….n
109.    1,11,111……………………….n
110.    2-4+6-8+10……………………….N
111.    1+(1+2)+(1+2+3)+(1+2+3+4)+……………….(1+2+3……..20)
112.   
113.    1,4,5,9,14,23,37,60……………………….n
114.    0,1,1,2,3,5,8,13……………………….n
115.    14,24,34,44……………………….n
116.    1231491, 1681, 1256, 6561, 165536, 43046721 sum of all above terms in the series is 4339194.
117.    WAP to print the cube of all non prime numbers till x.
118.    Print all the non perfect nos. till x
119.    Count how may zero's are there in a no entered by the user.
120.    Accept x numbers from the user and count how many are negative, positive and zeroes.
121.    Accept 10 nos. from the user and find the smallest and the largest no entered by the user.
122.    Accept a no from the user and print it in words.
123.    Accept 50 nos. from the user and count how may belong to which group.

0-10
10-20
20-30
30-40
40-50
50-60
60-70
70-80
80-90
90-100 above

124.    Check the nature of the no entered by the user (Single digit double light…….)
125.    Print the table of a no till 20
126.    Print the twin prime nos. till the limit (entered by the user)
127.    Print the integers that has the largest no factors between 1 to 10000.
128.    Print the average of the factors of a given no.

Comments

Popular posts from this blog

unix commands