if statement ?

if firstPrice<secondPrice then the firstPrice is discarted but if its the other way around then the secondPrice is discarted.

cout << "the first price is discarted" << endl;
cout << "the second price is discarted" << endl;

how can i make so if (firstPrice==secondPrice), then either one is chosen?
if (6>5)
cout << "none is chosen!"
my bad i didnt make it clear, if firstPrice==secodPrice

either
cout << "the first price is discarted" << endl;
or
cout << "the second price is discarted" << endl;
is displayed
make one if with the case 1 being greater than the other then inside that you do your c out then make an if else with your 2nd case and inside that one you have the message printed out there you want
computers dont have any personal choice. without specific instruction how can it chose between something. you can add coin-flip algorithm
Topic archived. No new replies allowed.