My focus is to see the program do a calculation of the cost of a product but also if the person who is using the program wishes to continue if the input that they did was not their choice, they should do so.
Thanks for any assistance that I will get.
using namespace std;
cout << "1. Ham - $4\n"
<< "2. Veggie - $3\n"
<< "3. Rat - $2\n"
cout << "Choose a sandwich: (1,2 or 3, others to exit)" << "\n";
cin >> sandwich;
while ((sandwich > 0) && (sandwich < 4));
cout << "Invalid Order)" << "\n";
while ((sandwich < 0) && (sandwich > 4));
if (sandwich == "1. ham")
cost = 4;
else if (sandwich == "2. veg")
cost = 3;
if (sandwich == "3. rat")
cost = 2;
return (std::cout << "Invalid sandwich\n"));
cout << "The cost is $" << cost << '\n';