Skip to content

Instantly share code, notes, and snippets.

@wanantope
Created October 7, 2024 14:36
Show Gist options
  • Save wanantope/0eefc565c070698af480abd3591bc309 to your computer and use it in GitHub Desktop.
Save wanantope/0eefc565c070698af480abd3591bc309 to your computer and use it in GitHub Desktop.
11_21_homework
//11.21
public class Main {
public static void main(String[] args) {
int[] yanvar = new int[31];
int sum = 0;
for (int x = 0; x < yanvar.length; x++) {
yanvar[x] = (int) (Math.random() * 100);
sum = sum+x;
}
System.out.println(sum);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment