Print Numbers from 1 to N(For Loop)

 #include<stdio.h>

int main()

{

    int n,i;


    printf("Enter n: ");

    scanf("%d",&n);


    for(i=1;i<=n;i++)

        printf("%d ",i);

}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices