Saturday, 15 June 2013

Java program that ask the user to enter the number of random values they wish to generate -


Basically I need a program that asks the user to enter several random values ​​that they want to generate. Then the program has to generate the user specified number of random values. But each random number should be between 0 and 100. I should have the value of print and number of numbers in the console and finally the sum of the random values ​​must be printed

  / ** * * Beasbriguong * * @ version 1.0 vom 22.06.2013 * @ Author * / Import java.io * *; Public category AADA {public static zero main (string [] args) {new buffet reader (neweststream reader (system.) In buffered reader); System.out.println ("How many numbers do you want to generate?"); String text = ""; Try {text = in.readLine (); } Hold (IOException ioe) {} int sum = 0, num = 0; For (int i = 0; i   

You need to save this thing in "asd.java" and then run it.

No comments:

Post a Comment