Oct 6, 2014 at 8:32pm UTC
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?
Oct 6, 2014 at 9:22pm UTC
if (6>5)
cout << "none is chosen!"
Oct 6, 2014 at 9:39pm UTC
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
Oct 6, 2014 at 9:42pm UTC
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
Oct 6, 2014 at 10:25pm UTC
computers dont have any personal choice. without specific instruction how can it chose between something. you can add coin-flip algorithm