Проблема в том, что я инициализировал переменную Char как Q, чтобы LOOP не выполнялся, но, к сожалению, он выполняется ?!Я не смог найти логический поток в этой операции, что я делаю неправильно, почему LOOP выполняется, хотя он не должен.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
cout << "This program is giving you some options, each"
" option allows you to perform actions" << endl;
char options{'Q'};
vector <int> numbers {1,2,3,4,5,6,7,8,9,10};
while (options != 'Q' || options != 'q' ){
cout << " P - Print numbers " << endl;
cout << " A - Add a number " << endl;
cout << " M - Display list of the numbers" << endl;
cout << " S - Display the smallest number " << endl;
cout << " L - Display the largest number" << endl;
cout << " Q - Quit"<<endl;
cout << " Enter your choice : " << endl;
cin >> options;
// Printing Numbers
if (options =='P' || options =='p'){
for (auto x : numbers){
cout << x << endl;
}
}
}
return 0;
}