Hi, I'm new to the forum but I'm a computer engineering student at an engineering school so I will probably frequent here. I'm having a problem with creating a class based calculator. Our TA wanted us to have a calculator work that based on two things: 1. The variables for the input numbers must be floats or doubles.
2. You must be able to type in the operation you want after inputting the variables with a string. I.e, "summation" for addition and "subtraction" for subtraction. I'm going to copy-paste my visual studio code, and would love if someone could look at it and tell me why I'm getting extraneous results in the console.
using namespace std;
result = firstVariable + secondVariable;
cout << "Result of summation: " << result << endl;
result = firstVariable - secondVariable;
cout <<"Result of subtraction: " << result << endl;