-1

I want to get my while loop to sound an alarm when the value exceeds 20. To do this I am trying to use a while loop where if the final value exceeds 20 sound an alarm. How do I get my while loop to stop when the random number is >20? Numeric is equal to 2.1 and numeric 2 is equal to 18, this is so it will show values between 18 and 20. My working so far:

John Dvorak
  • 26,799
  • 13
  • 69
  • 83
user3008456
  • 35
  • 2
  • 6

1 Answers1

1

Compare whatever it is you want to be checked against a constant of value 20, and wire the output of that to the stop

darthbith
  • 18,484
  • 9
  • 60
  • 76
mjs
  • 2,837
  • 4
  • 28
  • 48