Hello, I am JUST starting C++. Im 14 and I know this code needs work, and was wondering if anyone would be willing to check the code and tell me what needs to be done, so I can learn right. This is not finished quite yet
#include <iostream>
usingnamespace std;
int main()
{
string mostRecentFunction;
float answer;
float x;
float y;
cout << "Welcome to the calculator! your most recent function was: "<< mostRecentFunction << "\n\n";
cout << "Would you like to add or subtract?\n\n";
cin >> mostRecentFunction;
if(mostRecentFunction == "Subtract"||"subtract")
{
cout<<"\n\nInsert the number you want to have subtracted\n\n";
cin >> x;
cout << "\n\nInsert the amount you want subtracted\n\n";
cin >> y;
answer = x - y;
cout <<"\n\n" << x << " - " << y << " is " << answer<<endl;
}
return 0;
}