+1

A little problem.

When you enter " 1 " you can see immediately 2 answers. How to fix it? https://code.sololearn.com/cWfefDYe1CWf/?ref=app

3/29/2020 7:26:08 PM

tOPovIY_poDRosTok2009rus

2 Answers

New Answer

+5

#include <iostream> using namespace std; int main() { int a; cout<< "Hi. Please, choose right answer. \n \n \n"; cout<< "1. The formula of water?" <<endl <<endl; cout<< "1 - H2O 2 - HCl" <<endl <<endl <<endl <<endl; cin>>a; if (a == 1) { cout<< "Right!"; } else if (a == 2) { cout<< "Not right!"; } else { cout<< "Here is only 2 answers."; } return 0; }

0

hai i do it https://code.sololearn.com/cIxz3zXXtNz2