0

C++ separate if

So I’m wondering how to seperate if statements so i could input something like Hi then input something different and get a different answer

4/8/2019 1:58:40 AM

Feline_CODEZ

2 Answers

New Answer

0

Separate the if with an else-if statement and check if another condition is met. if (!str.compare("Hi")) std::cout << "Hello\n"; else if (!str.compare("Hello")) std::cout << "Hi\n"; else std::cout << "Greetings\n";

0

ok thanks