0% found this document useful (0 votes)
30 views2 pages

Program List No-3

This document provides 26 programming problems involving looping and jumping control structures in C programming. The problems cover a range of tasks including calculating factorials, sums, averages, Fibonacci sequences, number conversions, Armstrong numbers, character printing, and generating combinations and tables. The problems are meant to help apply concepts like for, while, do-while, goto, break and continue statements.

Uploaded by

virecey444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Program List No-3

This document provides 26 programming problems involving looping and jumping control structures in C programming. The problems cover a range of tasks including calculating factorials, sums, averages, Fibonacci sequences, number conversions, Armstrong numbers, character printing, and generating combinations and tables. The problems are meant to help apply concepts like for, while, do-while, goto, break and continue statements.

Uploaded by

virecey444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

C- PROGRAM LIST-3 LOOPING & JUMPING CONTROL STRUCTURE

Note: - apply for, while, do-while, goto, break & continue control structure according to your own logic.

1. WAP to calculate factorial of an input number.


2. WAP to calculate sum of all number between ranges from n1 to n2.
3. WAP which take multiple inputs until 0 number & display average of those numbers. Your program can
accept only 0 to 9 numbers.
4. WAP to display all even & odd number separately between 60 to 90.
5. WAP to display Fibonacci series of n terms like result= 0, 1, 1, 2, 3, 5, 8, 13, 21………
6. WAP to display only those numbers between 200 to 400 which is either divisible by 3 or 5.
7. WAP to convert one number system to another-
a. Decimal to binary d. Binary to decimal g. Octal to decimal
b. Decimal to octal e. Binary to octal h. Octal to Binary
c. Decimal to hexadecimal f. Binary to hexadecimal i. Octal to hexadecimal

8. WAP to calculate average of all those number between 100 to 300 which is divisible by 5, 7 & 10.
9. WAP to input n value from user & display max number between then. Don’t use array.
10. WAP to count number of digit in input integer number. (Ex-4123 has 4 digit).
11. WAP to display all digit of input integer number in reverse order. (Ex- input-5439output-9345)
12. WAP to display * in following manner. Design all for n number of lines.

1) * 2) ***** 3) * 4) ***** 5) * 6) * 7) * 8) *********

** **** ** **** *** ** ** *******


*** *** *** *** ***** *** *** *****
**** ** **** ** ******* ** ** ***
***** * ***** * ********* * * *
9) * 10) * 11) 1 12) 1 13) 1
*** * * 12 22 2 3
***** * * 123 333 4 5 6
******* * * 1234 4444 7 8 9 10
***** * * 12345 55555 1112131415
*** ** 123456 666666 161718192021
* * 1234567 7777777

13. Write a program to calculate overtime pay of employees. Overtime is paid at the rate of Rs. 12.00 per
hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of
an hour.
14. Two numbers are entered through the keyboard. Write a program to find the value of one number
raised to the power of another.
15. Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of
the number is equal to the number itself, then the number is called an Armstrong number. For example,
153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 )
16. Write a program to enter the numbers till the user wants and at the end it should display the count of
positive, negative and zeros entered.
17. Write a program to find the range of a set of numbers. Range is the difference between the smallest
and biggest number in the list.
18. Write a program to print all the ASCII values and their equivalent characters using a while loop. The
ASCII values vary from 0 to 255.
19. WAP to display all divisor of an input number.(EX- input-12 output- 1, 2, 3, 4, 6, 12)
20. WAP to calculate least common factor of three numbers.
21. WAP to calculate highest common factor of three numbers.
22. WAP to print all prime numbers from 1 to 300. (Hint: Use nested loops, break and continue)
23. WAP to fill the entire screen with a smiling face. The smiling face has an ASCII value 1.
24. WAP to add first seven terms of the following series using a for loop:
1/1! +1/2! + 1/3! +…….
25. WAP to generate all combinations of 1, 2 and 3 using for loop.

TIETECH JBP... 1 Mo-


9993204476
C- PROGRAM LIST-3 LOOPING & JUMPING CONTROL STRUCTURE

26. According to a study, the approximate level of intelligence of a person can be calculated using the
formula:- i = 2 + ( y + 0.5 x ). Write a program, which will produce a table of values of i, y and x, where
y varies from 1 to 6, and, for each value of y, x varies from 5.5 to 12.5 in steps of 0.5.

TIETECH JBP... 2 Mo-


9993204476

You might also like