Question: C++ How to write a while loop that checks for everything other than integers. Idea that I'm going for is cout < < please enter

C++

How to write a while loop that checks for everything other than integers.

Idea that I'm going for is

cout << "please enter integer 1";

cin >> int1

cout << "please enter integer 2";

cin >> in2

while ( in1 && int2 != int ) {

cout << "invalid input please enter an integer";

}

But not sure how to implement proper while parameters.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!