C Language Programs: Loop-based

Programs related to for loop, while ,loop , do while loop

  1. C program to check and print whether the number is prime number or not

  2. C program to print all prime numbers from 1 to 100

  3. C program to print all prime numbers upto a limit.

  4. C program to print all prime numbers from 100 to 150.

  5. C program to print all prime numbers between lower and upper limit.

  6. C program to print sum of the digits of the number

  7. C program to print product of the digits of the number

  8. C program to check number is a spy number or not (spy number : if sum of the digits and product of the digits is same)

  9. C program to print Reverse of a number

  10. C program to calculate and print reverse of a number

  1. C program to check and print whether the number is palindrome or not.

 

C program to take input for a number check and print whether the number has sum of the digits and prorudt of the digits as same or not?

Ex:
22
2+2=4 : 2*2=4
123
1+2+3=6 : 1*2*3=6
All combinations of 123

C program to take input for a number and print its Reverse.
Ex:
i/p : 1234
o/p : 4321

C program to take input for a number calculate and print is reverse.

C program to take input for a number check and print whether the number is palindrome or not.

Palindrome: if reverse of the number is equal to the number.
Ex: 121, 1221

C program to find length of the numbers (i.e. to count total digits in the number)

C program to take input for a number check and print whether the number is an “ArmStrong” number or not.
Armstrong number(three digit): if sum of the cube of the digits of the number is equal to the number.
Ex:
153: 1+125+27=153
370:
371:
407:

C program to take a number , check and print whether the number is a “Catalyst number/Strong Number” or not?
Catalyst/Strong number : if sum of the factorial of the digits of the number is equal to the number.
145: 1+24+120=145

C program to print Fibonacci series upto the limit.
Given : 0 1
0 1 1 2 3 5 8

WAP to print Fibonacci series upto specified terms.
Example:
terms: 7
Given : 0 1
0 1 1 2 3 5 8

C Language Programming Tutorial

C Language Tutorial Home    Introduction to C Language     Tokens     If Condition     goto statement and Labelname     Switch Statements     For loop     While Loop    Do while loop     break and continue    Functions    Recursion    Inbuild Functions    Storage Classes    Preprocessor    Arrays    Pointers     Structures and Unions    File Handling     Projects

Tutorials

Technical Questions

Interview Questions

C Programming
C++ Programming
Class 11 (Python)
Class 12 (Python)
C Language
C++ Programming
Python

C Interview Questions
C++ Interview Questions
C Programs
C++ Programs

Number Of Visitors

0270470