Write a program that will calculate the sum of any 25 random numbers.
Answers
Answered by
0
public class RandomSumGenerator {
public static void main(String[ ] args) {
int sum = 0;
for (int i = 0; i < 10; sum += (int) (Math.random( ) * 100) + 1, i++);
System.out.println("Sum of Random numbers - " + sum);
}
}
Similar questions