#include
using namespace std;
int main()
{
int pH;
cout<<"please tpye the pH to the nearest whole number: ";
cin>> pH;
cin.ignore();
if ( pH < 7 ) {
cout<<"This pH level is acidic \n";
}
if ( pH > 7 ) {
cout<<"This pH level is basic \n";
}
if ( pH == 7 ) {
cout<<"The pH is neutral \n";
}
if ( pH < 0 ) {
cout<<"Please reenter a pH level between 0 and 14 \n";
}
if ( pH > 14 ) {
cout<<"Please reenter a pH level between 0 and 14 \n";
}
cin.get();
}
--- How do you insert the loop here to continually repeat the above when a user hits enter? Thanks for any help.
2006-12-04
08:47:19
·
4 answers
·
asked by
dude605
3
in
Computers & Internet
➔ Programming & Design