#include <iostream>

using namespace std;


int main(int argc, char **argv)

{

    char input {};

    

while(input != 'q' || input != 'Q')

    {

        cout << "P: Print numbers" << endl;

        cout << "A: Add a number" << endl;

        cout << "M: Display mean of the numbers" << endl;

        cout << "S: Display the smallest number" << endl;

        cout << "L: Display the largest number" << endl;

        cout << "Q: Quit" << endl;

        

        cout << "Type in command: ";

        cin >> input;

        cout << "Input command was " << input << endl;

        

    } 

    

    

    

    

    cout << "Goodbye..." << endl;

    

return 0;

}


input을 입력 받아서 q나 Q가 입력되면

루프를 중단할려고 햇는데 q 눌러도 계속 루프하게 되는데 

왜 그런지 모르겟삼. 

while 옆에 괄호에 조건이 하나라도 거짓이면 루프 끝나야 되는거 아닌가?

만약 q를 입력하면 q != q 니까 거짓이고 루프 끝나야 될거 같은데 안끝나. 

도와주삼