Hi there, essentially what I'm trying to do is set it up where I ask a true or false question and if the answer isn't true then it will continue to ask another question. My problem is that when I run the code the answer that should come up with yes comes up regardless of what the user inputs. My code is incomplete but if I can figure out how to do this section then I can replicate it for the rest. Thanks in advance. My code thus far is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
int main(){
bool a
cout <<"True or false, was it detected in the tracking chamber and deposited in the E/M calorimeter?";
cin >> a;
if (a=True)
{
cout <<"electron";
}
else
{
cout <<"True or false, was it undetected in the tracking chamber and deposited in the E/M calorimeter?";
}
return 0;
}