Hi guys.
Ok first emersion into the program
got to ask to input age and day
then with given, I got to calculate the discount
when I input age Below 16 and over 65 I have no problems
All works fine
But when I enter between ages of 17 to 64, I get double answers , one right and one wrong of course
I went over it cm by cm and can get what is wrong
Any ideas
Thanks in advance
When I change the two first || for &&, The programs does not go to the end. It stops have half and says build is successful and does not show any prices and discounts
If I put all || same results
If I put all && then I get double results for all like so
Sounds like you're thrashing instead of thinking the logic through. For example, part of your original logic was
There is no age that satisfies both the left and right hand side of the expression. Age can't be both less than 17 AND greater than 64. Impossible. So you need to reexamine your logic.
Can you write down in English (sorry, my native tongue) what logic you are trying to implement with this if statement? I might then be able to be of more help. I don't quite follow when you say "write them on separate lines".
Thanks Carey
I resolved the problem. It was a bracket thing
But your logic thing did make me think as well so thanks for that as well
Thanks for the help
Don't get me started about those stupid light bulbs.