Print 1 to 100 numbers in C is a very simple and easy program to implement. It’s a very basic program which only prints a number from 1 to 100 in sequence to the output screen.

Algorithm to print 1 to 100 numbers in C

  1. Declare variable i = 1
  2. Write loop to print numbers
    for(i = 1 ; i < = 100 ; i ++)
    print i

C program to print numbers from 1 to 100

#include<stdio.h>
void main()
{
//declare variable
int i;
//main logic
for(i = 1 ; i < = 100 ; i ++)
{
printf ("%d ",i);
}
}

Output:

C program to print numbers from 1 to 100

Write A Comment