Miscellany
public cpp v1 · immutable#import <iostream>using namespace std;int main(){ const int ANSWER=7; int response; cout<<"The number is between 1 and 10."<<endl; cout<<"Guess it correctly or enter 0 to quit."<<endl; do { cout<<"Enter a number: "; cin>>response; cout<<""<<endl; if(response>ANSWER) cout<<"Too high."; else if(response<ANSWER) cout<<"Too low."; cout<<""<<endl; } while(response!=ANSWER && response!=0); if(response==ANSWER) cout<<"You win!"; else cout<<"You quit."; cout<<""<<endl; return(0);}