CAN ANYONE HELP FIX MY C++ CODE

https://pastebin.com/L4p2dpk4 My code is there ^^ ** if ((drug_potency_loss < 100 && drug_potency_loss > 0) && (target_effectiveness > 25 && target_effectiveness < 100)) { cout << "Potency loss = " << drug_potency_loss / 100.00 << endl; // This will calculate the potency loss in decimal numbers instead of percentage numbers. cout << "Target effectiveness = " << target_effectiveness << endl; // cout statement tells the user the target effectiveness. cout << " " << endl; //creates a blank line. cout << "Determining drug effectiveness: ..." << endl; // cout statement. cout << "" << endl; // blank line. }** (Lines 22-28) With this code, the user is supposed to enter -4 50 and then it will say error, try again 101 (error) 100 (error) and then 4 (the code will work) but the output from my code won't show. However, whenever I type in 4 50 for the first time, the output shows. I put all of my code in a do-loop but for some reason, the output that is bolded will only appear whenever I type in the correct numbers. I'm trying to make that specific part of the code show regardless of the attempts tried. That's all I needed help fixing. *AND YES THE CODE COMPILES AND THE LOOP WORKS*
Share
Best New

We're testing a new feature that gives the option to view discussion comments in chronological order. Some testers have pointed out situations in which they feel a linear view could be helpful, so we'd like see how you guys make use of it.

Report as:
Offensive Spam Harassment Incorrect Board
Cancel