MrThoe

Untitled

Sep 9th, 2019
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. public class PracticeQuiz1C {
  3.  
  4. public static void main(String[] args) {
  5. // TODO Auto-generated method stub
  6. int[] someNumbers = new int[5]; //#1
  7. double[] negatives = new double[10]; //#3
  8.  
  9. for (int i = 0; i < 5; i++) {
  10. someNumbers[i]= (int)(Math.random()*41)+10;
  11. System.out.println(someNumbers[i]);
  12. } //#2
  13.  
  14. for (int i = 0; i < 10; i++) {
  15. negatives[i] = Math.random()*100-100;
  16. System.out.println(negatives[i]);
  17. } //#4
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment