Dear students,
Find attached second assignment based on basic applications of loops.
5.
WAP to input 10 integers (both positive
and negative) and compute the sum of all positive values and print the sum and
number of values added. The program should terminate if the sum exceeds 30.
Find attached second assignment based on basic applications of loops.
SECOND
ASSIGNMENT ON BASIC APPLICATION OF LOOPS
1.
WAP to reverse a number. For ex: if
input is 2314 output should be 4132.
2.
WAP to read the age of 100 persons and
count the number of persons in the age group 50 to 60. Use FOR and CONTINUE
statement.
3.
WAP to print binary equivalent of a
number entered by the user.
4.
WAP to print all integers that are not
divisible by either 2 or 3 and lie between 1 and 100. Program should also
account the number of such integers and print the result.