C Programs - Loops
While programming we usually come across a requirement where we want to execute a block of code repetitively.
Loops help us to achieve such functionality.
A loop executes a block of code until the condition given to it becomes false.
Basically there are three types of loop in C language
- for loop
- while loop
- do-while loop
List of programs
- C program to print all natural numbers from 1 to n
- C program to print all natural numbers in reverse
- C program to print alphabets from a to z
- C program to print all even numbers
- C Program to print all odd numbers
- C Program to find sum of all natural numbers
- C Program to find sum of all even numbers
- C Program to find sum of all odd numbers
- C Program to count number of digits in a number
- C program to find first and last digit of a number
- C program to find sum of first and last digit of a number
- C program to swap first and last digits of a number
- C program to find sum of digits of a number
- C program to find reverse of a number
- C program to check if a number is palindrome
- C program to find frequency of each digit in a given number
- C program to print number in words
- C program to find power of a number using loop
- C Program to find all factors of a number
- C program to calculate factorial of a number
- C program to find HCF of two numbers
- C program to find LCM of two numbers
- C program to check if a number is prime number
- C program to print all prime numbers from 1 to n
- C program to find sum of all prime numbers from 1 to n
- C program to find all prime factors of a number
- C Program to check if a number is armstrong
- C program to print all Armstrong numbers from 1 to n
- C Program to Check for Perfect Numbers
- C program to print all Perfect numbers from 1 to n
- C program to check if a number is Strong number
- C program to print all Strong numbers from 1 to n
- C program to print Fibonacci series