hey guys, i got a question, i wrote exam and had to do nested if statements. let's say age is stored as a one dimensional array with range 1 to 50, and certain age intervals recieve a prize if a person wins within that age interval.
so say the following intervals recieves a prize, and prize is of type string, and u needed to use if statements, is it wrong if u say:
ok sorry think i explained it wrong, let me start over. i needed to use nested if statements with an one dimensional array called age and it has range 1 to 50. so say theres a competision and they give away prizes for range 14 to 25, 26 to 40, and over 40. the rest dont get a prize. so if range 14 to 25 wins a cellphone, 26 to 40 wins a voucher and over 40 wins a coffee machine, and the rest wins nothing.
now i am competing and i press my agw is 27, i would win a voucher.