this is probably a simple fix, but I'm trying to use if-then statements to set up a calculator that asks what type of equation and all that, I spent a while on it and I'm tired, so this is probably a simple fix but here is the code
#include <iostream>
using namespace std;
int main()
{
float x;
cout << "please enter 1 or 2: ";
cin >> x;
if ((x = 1)){
float x;
cout << "1please enter 0, 2, 3, or 4: ";
cin >> x;
{if ((x = 1)){
cout << "Fix this ####, 1.0";//this is only here to let me know if i figured out the problem, and if i solved it.
return 0;
}
else if ((x = 0)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 1.1";
return 0;
}
else if ((x = 2)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 1.2";
return 0;
}
else if ((x = 3)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 1.3";
return 0;
}
else if ((x = 4)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 1.4";
return 0;
}
}
}
else if ((x = 2)){
float x;
cout << "2please enter 1, 2, 3, or 4: ";
cin >> x;
{if ((x = 1)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 2.1";
return 0;
}
else if ((x = 2)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 2.2";
return 0;
}
else if ((x = 3)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 2.3";
return 0;
}
else if ((x = 4)){
cout << "yay, your not a dumbass, unless this went after the second imputs, 2.4";
return 0;
}
}
}
}
please help and I will be very gratefull.
PS. I can not spell, so any spelling errors please don't judge me for
PPS. I looked on Google, but I am bad at figuring out what to search, and so if it on google how to help, please just post the link and I will try to look at it and reply whether or not I figured it out.