#include<stdio.h>
#include<conio.h>
void main()
{
int i,num;
printf("Enter the last number:");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
printf("\n%d",i);
}
getch();
}
|
program to print series from 1 to n using for loop |
|
output for series from 1 to n using for loop |
No comments:
Post a Comment