Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Print first 10 numbers using loop | C program


#include<stdio.h>
int main()
{
    for(int i=1;i<=10;i++)
    {
        printf("%d\n",i);
    }
    return 0;
}

You may also write this program using while loop

#include<stdio.h>
int main()
{
    int i=1;
    while(i <= 10)
    {
        printf("%d\n",i);
        i++;
    }
    return 0;
}
Bhuvan Arora

No comments:

Amazing Deal !