Advertisement
CuteDogAteMineFrog

zadanie 11

Jan 25th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package com.kurs_java;
  7. import java.lang.Math;
  8. /**
  9. *
  10. * @author Jakub
  11. */
  12. public class zadanie11 {
  13. public static void main(String[] args){
  14. int[] tablica;
  15. tablica = new int[20];
  16. int sum = 0;
  17. for(int a = 0; a<=19; a++){
  18. tablica[a]= (int)(Math.random()*100+1);
  19. sum += tablica[a];
  20. }
  21. System.out.println(sum);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement