I have did a code for school lately and feel most things are correct but after it will correctly run and do all functions it won't end the loop. Any help with my while statement would be appreciated since I can't seem to figure it out alone for now. The sentient values to stop loop should be 0,99 or greater, and any negative number.
The "Or" function is ||, not |. | is the bitwise operator of "Or," which doesn't set a true-false flag depending on whether any read true- rather, it takes two sets of data and computes, in binary, the combination of both (so 001 | 010 becomes 011). Anyway, just add the second | next to each, and maybe a few excess parentheses around each evaluation, and you should be good to go.
Not sure how I overlooked that but thanks for the feedback! However after i changed it and updated original post to show it will still run fine but when i enter 0 it still prompts me for hours worked so maybe i have some error in my logic style instead.
( (yw!=0) || (yw<0) || (yw<99) ) is always true. yw!=0 is true for all values except 0. yw<99 is true when yw is 0. So when you "or" these two together you always get "true".
Also, if yw<99 then it will always be less than 0, so yw<0 is not necessary.