for loop practice program assignments in C Language
Assignments/practicles using for loop:
Practice/Assignment set 1:
1. Write a program in C using for loop to display the first N natural numbers.
Output :
1 2 3 4 5 6 7 8 9 10......N
This is an example of for loop - In this C program, we are going to study or write a program to show/print all First natural numbers from given range (1 to N) using for loop
2. Write a program in C to print ODD numbers from 1 to N using for loop.
This is an example of for loop - In this C program, we are going to study or write a program to show/print all ODD numbers from given range (1 to N) using for loop.
3. Write C program to show EVEN numbers from 1 to N using for loop.
This is an example of for loop - In this C program, we are going to study how we can print or display all EVEN numbers from given range 1.. N using for loop.
4.Write a program in C to print all uppercase alphabets using for loop.
This is an example of for loop in C programming language - In this C program, we are going to print all uppercase alphabets from ‘A’ to ‘Z’ using for loop.
5. Write a program in c to display all lowercase alphabets using for loop.
This is an example of for loop in C programming language - In this C program, we are going to print all lowercase alphabets from ‘a’ to ‘z’ using for loop.
6. Write a program in C using for loop to read 10 numbers from the keyboard and find their sum and average.
This is an example of for loop in C programming language - In this C program, we are going to read any 10 numbers from keyboard calculate sum and average .
7.Write C program to read an integer and print its multiplication table using for loop.
In this program, we are reading an integer number and printing its multiplication table, the programs are implemented using for loop.
.8 C Program to check entered number is ZERO, POSITIVE or NEGATIVE until user does not want to quit using for loop.
This program will read an integer number and check whether entered number is Positive, Negative or Zero until user does not want to exit.
9. Write the Program in C language to find factorial of a number using for loop.
In this program, we will read and integer number and find the factorial using different methods - using simple method
10. Write C Program to find sum and average of first N natural number, N must be provided by the user.
This program will read the value of N from user(keyboard)and calculate sum and average from 1 to N, first N natural numbers means numbers from 1 to N and N will be read through user.
11. C program to reverse a given number using for loop.
This program will read value of N and print it reverse using for loop.
12. C program to check a given number is armstrong number using for loop.
This program will read value of N and print it if it is armstrong or not using for loop.
13. C program to print fibonacci series up to Given N numbersr using for loop.
This program will read value of N and print fibonacci series using for loop.
13. C program to check a Number is prime using for loop.
This program will read value of N and test whether is prime using for loop.
14. C program to convert decimal number to binary number using for loop.
This program will convert given decimal number to binary using for loop.
Practice/Assignment set 2:
1. C program to find sum of the square of all natural numbers from 1 to N Using for loop.
Series: 1^2+2^2+3^2+4^2+..N^2
2. C program to find sum of the all natural numbers from 1 to N using for loop.
Series: 1+2+3+4+..N
3.C program to find the sum of Natural Number/Factorial of Number of all natural numbers from 1 to N Using for loop.
Series: 1/1! + 1/2! + 1/3! + 1/4! + ... N/N!
4) C program to find sum of following series using for loop:
1+ 1/2 + 1/3 + 1/4 + 1/5 + .. 1/N
5) C program to find sum of following series using for loop:
1 + 3^2/3^3 + 5^2/5^3 + 7^2/7^3 + ... till N terms