I am attempting to create a Currency Converter and am running into what I'm sure is a fairly easily solvable issue, namely that I have an "If" statement that isn't correctly identifying user input. If anyone has any feedback or solutions, i would be extremely grateful. Thanks.
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "Hello! Welcome to this converter! If you want to see all possible conversions, type Y. If not, type N to skip straight to the conversions!";
string choice;
cin >> choice;
string choice2;
cin >> choice2;
string choice3;
cin >> choice3;
if (choice == "Y" || "y" || "Yes" || "yes")
{
cout << "Major World Currencies: United States Dollar, $ (USD) Euro, € (EUR) BrEuropitish Pound Sterling, £ (GBP) Japanese Yen, ¥ (JPY) Swiss Franc, Fr (CHF) Australian Dollar, $ (AUD) Canadian Dollar, $ (CAD) Hong Kong Dollar, $ (HKD) Chinese Yuan, ¥ (CNY) Russian Ruble, ₽ (RUB)" << endl;
cout << " " << endl;
cout << "European Currencies: Albanian Lek (ALL) Bosnia-Herzegovina Convertible Mark (BAM) Bulgarian Lev (BGN) Belarusian Ruble (BYN) Czech Republic Koruna (CZK) Danish Krone (DKK) Guernsey Pound (GGP) Gibraltar Pound (GIP) Croatian Kuna (HRK) Hungarian Forint (HUF) Icelandic Króna (ISK) Jersey Pound (JEP) Moldovan Leu (MDL) Macedonian Denar (MKD) Manx pound (Isle of Man) (IMP) Norwegian Krone (NOK) Polish Zloty (PLN) Romanian Leu (RON) Serbian Dinar (RSD) Swedish Krona (SEK) Ukrainian Hryvnia (UAH)" << endl;
cout << ' ' << endl;
cout << " Middle East Currencies United Arab Emirates Dirham (AED) Bahraini Dinar (BHD) Israeli New Sheqel (ILS) Iraqi Dinar (IQD) Iranian Rial (IRR) Kuwaiti Dinar (KWD) Omani Rial (OMR) Qatari Rial (QAR) Saudi Riyal (SAR) Syrian Pound (SYP) Turkish Lira (TRY) Yemeni Rial (YER) » hide » North American Currencies Bermudan Dollar (BMD) Mexican Peso (MXN) " << endl;
cout << "" << endl;
cout << "Central American Currencies: Belize Dollar (BZD) Costa Rican Colón (CRC) Salvadoran Colón (SVC) Guatemalan Quetzal (GTQ) Honduran Lempira (HNL) Nicaraguan Cordoba (NIO) Panamanian Balboa (PAB)" << endl;
cout << "" << endl;
cout << "Currencies of the Caribbean: Aruban Florin (AWG) Barbadian Dollar (BBD) Bahamian Dollar (BSD) Cayman Islands Dollar (KYD) Cuban Convertible Peso (CUC) Cuban Peso (CUP) Dominican Peso (DOP) Haitian Gourde (HTG) Jamaican Dollar (JMD) East Caribbean Dollar (XCD) Netherlands Antillean Guilder (ANG) » hide » South American Currencies Argentine Peso (ARS) Bolivian Boliviano (BOB) Brazilian Real (BRL) Chilean Peso (CLP) Chilean Unidad de Fomento (CLF)" << endl;
cout << "" << endl;
cout << "South American Currencies: Argentine Peso (ARS) / Bolivian Boliviano (BOB) / Brazilian Real (BRL) / Chilean Peso (CLP) / Chilean Unidad de Fomento (CLF) / Colombian Peso (COP) / Guyanaese Dollar (GYD) / Peruvian Sol (PEN) / Paraguayan Guarani (PYG) / Surinamese Dollar (SRD) / Trinidad and Tobago Dollar (TTD) / Uruguayan Peso (UYU) / Venezuelan Bolívar Soberano (VES)" << endl;
cout << "" << endl;
cout << "African Curriencies: Angolan Kwanza (AOA) / Burundian Franc (BIF) / Botswanan Pula (BWP) / Congolese Franc (CDF) / Cape Verdean Escudo (CVE) / Djiboutian Franc (DJF) / Algerian Dinar (DZD) / Egyptian Pound (EGP) / Eritrean Nakfa (ERN) / Ethiopian Birr (ETB) / Falkland Islands Pound (FKP) / Gambian Dalasi (GMD) / Ghanaian Cedi (GHS) / Guinean Franc (GNF) / Kenyan Shilling (KES) / Comorian Franc (KMF) / Lebanese Pound (LBP) / Liberian Dollar (LRD) / Lesotho Loti (LSL) / Libyan Dinar (LYD) / Moroccan Dirham (MAD) / Malagasy Ariary (MGA) / Mauritanian Ouguiya (MRU) / Mauritian Rupee (MUR) / Malawian Kwacha (MWK) / Mozambican Metical (MZN) / Namibian Dollar (NAD) / Nigerian Naira (NGN) / Rwandan Franc (RWF) / Seychellois Rupee (SCR) / Sudanese Pound (SDG) / South Sudanese Pound (SSP) / Saint Helena Pound (SHP) / Sierra Leonean Leone (SLL) / Somali Shilling (SOS) / São Tomé and Príncipe Dobra (pre-2018) (STD) / São Tomé and Príncipe Dobra (since 2018) (STD) / Swazi Lilangeni (SZL) / Tunisian Dinar (TND) / Tanzanian Shilling (TZS) / Ugandan Shilling (UGX) / CFA Franc BEAC (XAF) / CFA Franc BCEAO (XOF) / South African Rand (ZAR) / Zambian Kwacha (ZMW) / Zimbabwean Dollar (ZWL)" << endl;
cout << "" << endl;
cout << "Currencies of Australia and Oceania: Fijian Dollar (FJD) / French Polynesia CFP Franc (XPF) / New Zealand Dollar (NZD) / Papua New Guinean Kina (PGK) / Samoan Tala (WST) / Solomon Islands Dollar (SBD) / Tongan Paʻanga (TOP) / Vanuatu Vatu (VUV) " << endl;
cout << "" << endl;
cout << "Other Currencies and More: Bitcoin (BTC) / Gold (troy ounce) (XAU) / Silver (troy ounce) (XAG) / Palladium (troy ounce) (XPD) / Platinum (troy ounce) (XPT) / Special Drawing Rights (International Monetary Fund) (XDR) " << endl;
}
return 0;
}