code below
diff_1 = 0;
if (diff_1 == 0.00) {cout<<"flag_1";}
if (diff_1==1.00) {pennies = pennies + 1;
cout<<"increment by a penny to "<<pennies<<endl;}
diff_1 = 0;
if (diff_1 == 0.00) {cout<<"flag_1";}
if (diff_1==1.00) {pennies = pennies + 1;
cout<<"increment by a penny to "<<pennies<<endl;}
To copy to clipboard, switch view to plain text mode
THis works a lot of the time but occasionally I'll run a number through the system and get bizzare output:
put in for diff_1-->1.00 (that's all - no decision tress)
sometimes 1.00 bypasses both conditions even though I manually set diff_1 to 1.00. and also fails to execute the decision tree next to it:
if (diff_1==1.00) {pennies = pennies + 1;
cout<<"increment by a penny to "<<pennies<<endl;}
if (diff_1==1.00) {pennies = pennies + 1;
cout<<"increment by a penny to "<<pennies<<endl;}
To copy to clipboard, switch view to plain text mode
Bookmarks