C++ Print first 10 natural numbers using while loop.

How to write C++ Program to print first 10 natural numbers using while loop ?

C Program To Print First 10 Natural Numbers Program to print the sum of first n natural numbers using C++ program to find the sum of first 10 natural numbers using C Program to Calculate Sum of Natural Numbers How to print the sum of first 10 Natural Numbers using
C++ Print first 10 natural numbers using while loop.



Solution:
//Program to print first 10 natural numbers using while loop.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a=0;
while(a<10)
{
++a;
cout<<a<<endl;
}
getch();
}

This C++ Program to print first 10 natural numbers using while loop .


Learn More :