Ok when it asks for me to type in the price of the tie and watch if I type in 11 then it will print the shoe is less then the watch... but if I type in something else wher eit makes the statement true it will not print the shoe is less then the watch.Code:#include <iostream.h> typedef short int si; int main() { si theShoe = 20; si theTie, theWatch; cout << "enter the price for your watch\n"; cin >> theTie; cout << "Enter a price for your tie\n"; cin >> theWatch; { if ( (theTie >= theWatch) && ( (theTie + theWatch) > theShoe) ) cout << "the shoe is less then the watch and the tie combined\n"; else if ( (theTie == theWatch) || ((theTie + 10) == theWatch) ) cout << "the tie is either worth as much as the watch or the tie is 10$ more then the then watch\n"; return 0; } }
Can anyone tell me what I have done wrong or something I can do to fix it please
Thanks,
Bb




Reply With Quote