1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kipiarov [429]
3 years ago
6

EX 3.8 Write code to declare and instantiate an object of the Random class (call the object reference variable rand). Then write

a list of expressions using the nextInt method that generates random numbers in the following specified ranges, including the endpoints. Use the version of the nextInt method that accepts a single integer parameter. 0 to 10 0 to 400 1 to 10 1 to 400 25 to 50 -10 to 15

Computers and Technology
1 answer:
densk [106]3 years ago
4 0

Answer:

Following is given the code step-by-step with all necessary decsription as comments in it. I hope it will help you!

Explanation:

You might be interested in
How many times is the second for loop going to loop in this block of code? Write your answer in numeric form in the box provided
pantera1 [17]

Explanation:

The second for loop does 1 of 4 iterations for every 1 of 5 iterations of the parent loop. meaning it is 4 x 5 which is 20.

8 0
2 years ago
Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
3241004551 [841]

Answer: a. intrapersonal and short-term goals

Explanation:

Intrapersonal goals are those that we set for ourselves in our minds to accomplish. The students that are finishing their homework after school most probably set that goal in their minds and so meeting it would mean meeting their intrapersonal goals.

Homework is not a long term project but rather a short one that is usually meant to be completed within days. Completing it is therefore a short term goal.

The students who finish their homework after school are therefore accomplishing both their intrapersonal and short-term goals.

6 0
3 years ago
Read 2 more answers
What animal is perry the platypus ​
valkas [14]

Answer: Agent P or simply Perry

Explanation:

4 0
3 years ago
Read 2 more answers
Eq-20 why is the height of a vhf radio antenna important
masya89 [10]
Reasons why the height of a VHF radio antenna is important is because VHF radios work by the line of sight principle.
Line of sight
its a line from observers eye to a distant point.its a line between two points specifically the straight path between a transmitting antenna (as for radio or television signals) and receiving antenna when unobstructed by the horizon.
7 0
3 years ago
Read 2 more answers
Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The user shoul
iVinArrow [24]

The do-while loop for the given problem is shown below.  

do  

{  

  // user asked to enter two numbers  

  cout<<"Enter two numbers to be added."<<endl;  

  cin>>num1;  

  cin>>num2;  

  sum = num1 + num2;  

 

  // sum of the numbers is displayed  

  cout<<"Sum of the two numbers is "<<sum<<endl;  

  // user asked whether to perform the operation again  

  cout<<"Do you wish to continue (y/n) ?"<<endl;  

   cin>>choice;  

}while(choice != 'n');  

The variables to hold the two numbers and their sum are declared as float so that the program should work well for both integers and floating numbers.

float num1, num2, sum;

The char variable is taken since it holds only a single-character input from the user, 'y' or 'n'.

char choice;

The whole program is given below.

#include <iostream>

using namespace std;

int main() {

float num1, num2, sum;

char choice;  

do  

{  

  // user asked to enter two numbers  

  cout<<"Enter two numbers to be added."<<endl;  

  cin>>num1;  

  cin>>num2;  

  sum = num1 + num2;  

  // sum of the numbers is displayed  

  cout<<"Sum of the two numbers is "<<sum<<endl;  

  // user asked whether to perform the operation again  

  cout<<"Do you wish to continue (y/n) ?"<<endl;  

  cin>>choice;  

}while(choice != 'n');

cout<<"Quitting..."<<endl;

}

5 0
3 years ago
Other questions:
  • Your organization will be handling market trades. You will be required to verify the identify of each customer who is executing
    8·1 answer
  • PLEASE HELPPPPPPP
    15·1 answer
  • Describe a time when you influenced someone else’s knowledge around technology, whether it be an app, a new gadget, etc. What di
    14·1 answer
  • An IT specialist is consulted about setting up a peer-to-peer network. What would the specialist say about security risk in this
    14·2 answers
  • How do emotions affect purchasing decisions?
    6·1 answer
  • What laptop is the best for programming and hacking​
    5·1 answer
  • what will be the Trade discount and Invoice Amount if the List Price is $400.00 and the Trade Discount Rate is 85%
    14·1 answer
  • Code embedded into an HTML page and downloaded by a user; resides on the client and helps process Web form input. Common clients
    9·1 answer
  • Which These operating systems use a graphical user interface?
    6·1 answer
  • Apply the Fill - Teal, Accent 4, Soft Bevel text effect (the 5th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!