I started Learning C++ Few Days ago (May be 4 Days or Low, I couldn't study some days because of some little things )
I used Do while Loop, I made some programs using " If" and "While". But this is the only one Left I deleted the others.
Code: Select all
#include<iostream>
#include<string>
#include<sstream>
using namespace std;
int main ()
{
string age;
int iage;
cout<<"Enter your Age [Enter Number Below 18] :";
getline(cin,age);
stringstream (age)>>iage;
cout<<iage<<" You are Still a Kid.... Press Enter for the Rest \n";
cin.get();
do
{
iage++;
cout<<iage<<" , ";
}
while(iage<18);
cout<<"Now You Are An Adult :D";
cin.get();
return 0;
}