15.c++ program to display numbers from 1 to 10 using while loop

// C++ program to display numbers from 1 to 10 using while loop

INPUT:

#include<iostream>

using namespace std;

int main()

{

    int i=1;

    while(i<=10)

    {

        cout<<i<<"\n";

        i++;

    }

}

OUTPUT:





 

Comments

Popular posts from this blog

8.c++ program to check whether the number is even or odd

1.c++ program to find the total marks and average of three subjects

4.c++ program to compute quotient and remainder