#14_LOOPs-While loop in c

 # include <stdio.h>

//while loop
int main()
{
    int n,i=1;
    printf("Enter a number: \n");
    scanf("%d",&n);
    while (i<n)
    {
        printf("%d\n",i);
        i=i+1;
    }
    
    return 0;
}

Comments

Popular posts from this blog

#64_Funtions for File I/O in C

#51_Ex_Game