There are 2 errors expression must be a modifiable lvalue (line 12) and expected a statement (line 25). I am new to c++ and i only know scratch and qbasic. I have been sitting in front of this error for almost 2 hours now.
Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int d;
cout << "Do you want Addition or Subtraction? (a/s)";
cin >> d;
if ('d' = "s");
{
int a, b;
cout << "Enter any number: ";
cin >> a;
cout << "Enter another number: ";
cin >> b;
int c = a + b;
cout << "The sum is ";
cout << c;
return 1;
}else{
int e, f;
cout << "Enter any number: ";
cin >> e;
cout << "Enter another number: ";
cin >> f;
int g = e + f;
cout << "The sum is ";
cout << g;
return 0;
}
}