Program to test loop-while

 ap2k

#include<iostream>
using namespace std;
 //program to test loop-while.
 int main(){

    int n;
    cin>>n;

    while(n>0){
        cout<<n<<endl;
        cin>>n;
    }
 
    return 0;
 }

Comments