0% found this document useful (0 votes)
20 views1 page

Loops Practice Programs

Uploaded by

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

Loops Practice Programs

Uploaded by

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

Object 4

1
2
3

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 swap first and last digits of a number.
14. Write a C program to calculate sum of digits of a number.
15. Write a C program to calculate product of digits of a number.
16. Write a C program to enter a number and print its reverse.
17. Write a C program to check whether a number is palindrome or not.
18. Write a C program to enter a number and print it in words.(0-10)
19. Write a C program to print all ASCII character with their values.
20. Write a C program to check whether a number is Prime number or not.
21. Write a C program to print all Prime numbers between 2 to n.
22. Write a C program to find sum of all prime numbers between 2 to n.
23. Write a C program to check whether a number is Perfect number or
not.
24. Write a C program to print all Perfect numbers between 1 to n.
25. Write a C program to find one’s complement of a number.
26. Write a C program to find two’s complement of a number.

You might also like