0% found this document useful (0 votes)
61 views

Loop Programs

The document lists 30 programming exercises involving loops in C programming language. The exercises include printing patterns like numbers, alphabets using loops, finding sum of numbers, checking properties of numbers like prime, palindrome, Armstrong etc using loops, and printing series like Fibonacci using loops. The exercises cover basic to intermediate level loop concepts in C programming.

Uploaded by

Piyush
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)
61 views

Loop Programs

The document lists 30 programming exercises involving loops in C programming language. The exercises include printing patterns like numbers, alphabets using loops, finding sum of numbers, checking properties of numbers like prime, palindrome, Armstrong etc using loops, and printing series like Fibonacci using loops. The exercises cover basic to intermediate level loop concepts in C programming.

Uploaded by

Piyush
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/ 1

Programs using Loops

1. Write a C program to print all natural numbers from 1 to n. - using while loop
2. Write a C program to print all natural numbers in reverse (from n to 1). - using
while loop
3. Write a C program to print all alphabets from a to z. - using while loop
4. Write a C program to print all even numbers between 1 to 100. - using while loop
5. Write a C program to print all odd number between 1 to 100.
6. Write a C program to find sum of all natural numbers between 1 to n.
7. Write a C program to find sum of all even numbers between 1 to n.
8. Write a C program to find sum of all odd numbers between 1 to n.
9. Write a C program to print multiplication table of any number.
10. Write a C program to count number of digits in a number.
11. Write a C program to find first and last digit of a number.
12. Write a C program to find sum of first and last digit of a number.
13. Write a C program to calculate sum of digits of a number.
14. Write a C program to calculate product of digits of a number.
15. Write a C program to enter a number and print its reverse.
16. Write a C program to check whether a number is palindrome or not.
17. Write a C program to find all factors of a number.
18. Write a C program to calculate factorial of a number.
19. Write a C program to find HCF (GCD) of two numbers.
20. Write a C program to find LCM of two numbers.
21. Write a C program to check whether a number is Prime number or not.
22. Write a C program to print all Prime numbers between 1 to n.
23. Write a C program to find sum of all prime numbers between 1 to n.
24. Write a C program to check whether a number is Armstrong number or not.
25. Write a C program to print all Armstrong numbers between 1 to n.
26. Write a C program to check whether a number is Perfect number or not.
27. Write a C program to print all Perfect numbers between 1 to n.
28. Write a C program to check whether a number is Strong number or not.
29. Write a C program to print all Strong numbers between 1 to n.
30. Write a C program to print Fibonacci series up to n terms.

https://codeforwin.org/2015/06/for-do-while-loop-programming-exercises.html

You might also like