Uploaded by Syed Shams-Ul Arefin

Integer print Until (-1)

advertisement
Write a program that will keep taking input integers until the user
enters a dot (-1) use while or do while.
Sol:
#include <iostream>
using namespace std;
int main()
{
int x;
cout<<"Enter the Integers"<<endl;
do{cin>>x;}
while(x!=-1);
cout<<"You inputed (-1) "<<endl;
}
Download