fork download
  1. import java.util.Scanner;
  2.  
  3. class MathDemo {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. //User Input of limit of cycles
  8. Scanner input = new Scanner(System.in);
  9. System.out.println("How many Random number do you want?(Enter Number 1-10)");
  10. limit = input.nextInt();
  11.  
  12. //For loop runnin guser input
  13. for (int counter = 0; counter < limit; counter++) {
  14. double random = Math.random() * 10;
  15. System.out.println("Random number:" + random);
  16. }
  17. // print the numbers and print the higher one
  18. System.out.println("Your Limit number Entered was:" + input);
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
Main.java:10: error: cannot find symbol
   	limit = input.nextInt();
   	^
  symbol:   variable limit
  location: class MathDemo
Main.java:13: error: cannot find symbol
    		for (int counter = 0; counter < limit; counter++) {
    		                                ^
  symbol:   variable limit
  location: class MathDemo
2 errors
stdout
Standard output is empty