vendredi 11 août 2017

Random number generator with varies conditions. 3 digits

Hi i am working on a random number generator which i faced a road block. I have done my program but i'm quite lost on how to do a loop for the program to keep on looping. following below is the conditions for program:

  1. The program prompts the user to enter a number.
  2. This number determines the number of times the loop will repeat. The number ranges from 0 to 100. Validate this range.
  3. The program uses a random number to generate a number from 0 to 9999 and then checks if the generated number contains the digit 1, digit 2 or digit 3.

Please advise on how do i require to do a switch or while loop for point 3. your inputs is greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire