Skip to content

apc-s-004.c

Problem Statement

Program to print first 10 natural numbers using while loop.

Metadata

Property Detail
Author Amit Dutta (amitdutta4255@gmail.com)
License MIT

Actions

Raw View on GitHub

💡 You can print or save this file by opening Raw and using your browser.

Source Code

#include <stdio.h>
#include <conio.h>

void main()
{
    clrscr();
    int x;
    x = 1;
    while (x <= 10)
    {
        printf("%d  ", x);
        x++;
    }
    getch();
}