Ad

Write a program in c++ to the first 10 natural number




#include<iostream.h>
using namespace std;
int main()
{
int i ;
cout << "The natural number are : \n";
       for (i=1; i<=10; i++)
       {
        cout<<i<<"";
       }
       cout<< endl;
}



Output--


The natural number are :
12345678910

Post a Comment

Previous Post Next Post