Assignment 07

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

List of loop programming exercises

==================================

1 Write a C program to print all natural numbers from 1 to n.


2 Write a C program to print all natural numbers in reverse (from n to 1).
3 Write a C program to print all alphabets from a to z.
4 Write a C program to print all even numbers between 1 to n.
5 Write a C program to print all odd number between 1 to n
6 Write a C program to print all natural numbers from m to n.
7 Write a C program to find sum of all natural numbers between 1 to n.
8 Write a C program to find sum of all even numbers between 1 to n.
9 Write a C program to find sum of all odd numbers between 1 to n.
10 Write a C program to calculate factorial of a number.
11 C program to find the sum of series 1/1 + 1/2 + 1/4 + ... + 1/n.
12 C program to find the sum of series x/1 + x/2 + x/4 + ... + x/n.
13 Write a C program to find all factors of a number.
14 Write a C program to check whether a number is Prime number or not.
15 Write a C program to count number of digits in a number.
16 Write a C program to find first and last digit of a number.
17 Write a C program to find sum of first and last digit of a number.
18 Write a C program to swap first and last digits of a number.
19 Write a C program to calculate sum of digits of a number.
20 Write a C program to calculate product of digits of a number.
21 Write a C program to enter a number and print its reverse.
22 Write a C program to check whether a number is palindrome or not.
23 Write a C program to find frequency of each digit in a given integer.
24 Write a C program to enter a number and print it in words.
25 Write a C program to print all ASCII character with their values.
26 Write a C program to find power of a number.
27 Write a C program to find HCF (GCD) of two numbers.
28 Write a C program to find LCM of two numbers.
29 Write a C program to print all Prime numbers between 1 to n.
30 Write a C program to find sum of all prime numbers between 1 to n.
31 Write a C program to check whether a number is Armstrong number or not.
32 Write a C program to print all Armstrong numbers between 1 to n.
33 Write a C program to check whether a number is Perfect number or not.
34 Write a C program to print all Perfect numbers between 1 to n.
35 Write a C program to check whether a number is Strong number or not.
36 Write a C program to print all Strong numbers between 1 to n.
37 Write a C program to print Fibonacci series up to n terms.
38 Write a C program to find one's complement of a binary number.
39 Write a C program to find two's complement of a binary number.
40 Write a C program to convert Binary to Octal number system.
41 Write a C program to convert Binary to Decimal number system.
42 Write a C program to convert Binary to Hexadecimal number system.
43 Write a C program to convert Octal to Binary number system.
44 Write a C program to convert Octal to Decimal number system.
45 Write a C program to convert Octal to Hexadecimal number system.
46 Write a C program to convert Decimal to Binary number system.
47 Write a C program to convert Decimal to Octal number system.
48 Write a C program to convert Decimal to Hexadecimal number system.
49 Write a C program to convert Hexadecimal to Binary number system.
50 Write a C program to convert Hexadecimal to Octal number system.
51 Write a C program to convert Hexadecimal to Decimal number system.
52 Write a C program to print Pascal triangle upto n rows.
53 Star pattern programs - Write a C program to print the given star patterns.
54 Number pattern programs - Write a C program to print the given number
patterns.
55
56
57
58
59
60
61 Write a c program to generate fibonacci series without recursion
62 Write a c program to generate fibonacci series using recursion
63 Matrix multiplication in c program with explanation
64 Factorial program in c without recursion
65 C program to check number is armstrong number or not
66 Check Armstrong number in c using recursive function
67 C program for even or odd using for loop
68 C program to check odd or even without using modulus operator and division
operator
69 Prime number program in c using for loop and while loop
70 C program to print prime numbers from 1 to n
71 C program to print multiplication table using while loop and for loop
72 C program to convert binary to decimal using for loop
73 C program to reverse a number using while loop and for loop
74 C program to find sum of n numbers using for loop
75 C program to find leap year using if else
76 c program to check leap year using conditional operator
77 C program to print patterns of numbers,alphabets and stars in a pyramid shape
78 C program to swap two numbers without using third variable and using
functions
79 C Program to swap two numbers without using third variable
80 Write a C program to swap two integer arrays
81 C program for swapping of two strings
82 C program to print given number in words
83 C program to print 1 to 100 without using loop
84 C program to find ASCII value of a string
85 Convert string to integer c programming
86 C program to display characters from a to z using loop
87 C programming power function example program
88 C program for addition subtraction multiplication and division using switch
case
89 C program to delete an element in an array
90 C program to insert an element in an array
91 Switch case in c example program
92 Prime number program in c using for loop
93 Fibonacci series in c without recursion
94
95

You might also like