when i run my code and enter in x, it prints out 124.28. can someone tell me why? Im trying to assign a letter a number and im not even sure if im doing it right so ignore that part. thanks
#include<iostream>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main()
{
char option;
char x = 0;
char X = 0;
double total = 0;
do{
cout << "Welcome to the coffee shop! we offer:" << endl;
cout << "C - Coffee = $1.29" << endl;
cout << "J - juice = $1.50" << endl;
cout << "S - Soda = $ 1.00" << endl;
cout << "T - Tea = $1.39" << endl;
cout << "M - Manager special = $2.99" << endl;
cout << "X - to end order" << endl;
cout << "What drink would you like? Press C,J,S,T,MS or X to finish order" << endl;
cin >> option;
if (option == 'C' || 'c')
{
total += 1.29;
}
if (option == 'J' || option == 'j')
{
total += 1.5;
}
if (option == 'S' || option == 's')
{
total += 1.00;
}
if (option == 'T' || option == 't')
{
total += 1.39;
}
if (option == 'M' || 'm')
{
total += 2.99;
}
if (option == 'X' || option == 'x')
{
total += option;
cout << "You have fninished your order, Your total is $" << total << endl;
return 0;
}