mardi 9 février 2021

What is the "If statement" in c++?

What is the output of this code.I can't understand the answer to the following question. Please help me

int t;
cout<<"Enter number."<<endl;
cin>>t;
if(t<5){cout<< "The statement is correct.";}
else if(t>7) {cout<<"Wrong statement.";}

If I enter 6 why don't appear any statement?

Aucun commentaire:

Enregistrer un commentaire