You are on page 1of 2

Assignment: 1

Write a program by using for loop, while and do while


1. Write a c program to print factorial of a number
2. Write a c program to print number of digits in an integer
3. Write a C program to print even numbers from 1-50
4. Write a c program to print all natural numbers in reverse
5. Write a program to print square of each number in separate line

Group1: roll number ending with 1 and 3


Group2: roll number ending with 2 and 4
Group3: roll number ending with 5 and 7
Group4:roll number ending with 6 and 8
Group 5: roll number ending with 9 and 0

Group 1: question1
Group 2: question2
Group 3: question3
Group 4: question4
Group 5: question5

Report format program ,output and iteration


(hand written or typed code both are acceptable)

Note:Be prepared for presention on your assigned question.

for(i=0;i<=20;i++)
{
Printf(“the square of %d is %d \n”,i,i*i); }

You might also like