Here is my code. The formula I entered on my if statement doesn't work.
#include <iostream>
using namespace std;
int main(){
int value;
cout << "a) Bread" << endl;
cout << "b) Wine" << endl;
cout << endl;
cout << "Please enter the letter of the type of product you want to buy: " << endl;
cin >> value;
if(value == a){
cout << "You chose bread";
} else{
cout << "You chose wine";
}
return 0;
}
Aucun commentaire:
Enregistrer un commentaire