print 10 natural number from 10-20

 #include <stdio.h>


int main()
{

    int i = 0;
   
    printf("The 10 natural numbers between 10 and 20 are:");
    while (i < 10)
    {
int a = 10;
       
        i++;
        a = a + i;
        printf("%d\n", a);
    }
    return 0;
}

Comments

Popular posts from this blog

snake game Version-2 (using random number)

allocating dynamic memory using calloc

store a table in dynamic array and then change the size of array dynamically to store more numbers