-1

I'm creating a program that has a section that requires the user to enter an even number only. If the user enters an odd number, the program will give the user a message and it will re-prompt the user of an even number.

Is there a way to do this without manually typing every even number??

  • 1
    if the modulus of that particular number with 2 is 0 then it is even. eg: 4%2= 0 so its even. also check https://stackoverflow.com/help/how-to-ask – Faraaz Kurawle Jun 02 '22 at 03:19

0 Answers0