so8991 2014. 12. 16. 15:53

OR : one of those options is true, then the whole statement is true. (||)

#include <iostream>

#include <cmath>

int main()

{

using namespace std;

cout<<"Do you think.....?<y/n>"<<endl;

char answer;

cin>>answer;

if (answer=='y' || answer=='Y')

cout<<"you fn perv"<<endl;

else if (answer=='n' || answer=='N')

cout<<"ok you're fine"<<endl;

else

cout<<"answer the question right"<<endl;

system("pause");

return 0;
}