Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Generate 10 random numbers between 1 and 50 using either the random() function. For each number generated: a) If the value is greater than 45

image text in transcribed
Generate 10 random numbers between 1 and 50 using either the random() function. For each number generated: a) If the value is greater than 45 have the script display the number plus 50 . b) If the value is less than 10 have the script display the number. as is. c) If the value is between 15 and 20 then display the number minus 10 . d) Otherwise display the number minus 100. import java.util.Random; public class Question4 I public static void main(String args[]) [ Random rand = new Random(); int new Rand =0; II/todo 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions