Computer Science, asked by Xxdiya76xX, 1 month ago

write valid statement to print a random integer between 50 and 70 in java​

Answers

Answered by GiyuuTomioka
4

Print a random integer between 50 and 70

int range = 70 - 50 + 1;

int num = (int)(range*Math.random() + 50); System.out.println(num);

Hope it helps !!! :D

Similar questions