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
Harman [31]
3 years ago
7

Write a c++ program that generates three random numbers. The first number should be between 0-30, the second number should be be

tween 30-60 and the third number should be between 60-90.
Computers and Technology
1 answer:
Rama09 [41]3 years ago
8 0

Answer:

#include <stdlib.h>

#include <time.h>  

#include <iostream>

using namespace std;

int main() {

   srand(time(NULL));

   cout << rand() % 30 << endl;

   cout << rand() % 30 + 30 << endl;

   cout << rand() % 30 + 60 << endl;

}

Explanation:

rand() returns a pseudo-random integral number in the range between 0 and RAND_MAX. By applying the modulo operator, you map that to the desired range (30 in your case), then you add an offset.

You might be interested in
To solve the difficulty of scaling memory organization, memories are physically organized into a ____-dimensional organization.
Brums [2.3K]

Answer: two

Explanation:

Organizational memory is simply referred to as the accumulation of data or information that have been created for a particular organization.

To solve the difficulty of scaling memory organization, memories are physically organized into a two dimensional organization.

3 0
3 years ago
Gina is upgrading your computer with a new processor. She installs the processor into your motherboard and adds the cooling syst
Setler [38]

Answer:

Option B is Correct.

Explanation:

Thermal paste is used in the CPU motherboard to reduce the heat.

Thermal paste is a heat observing coating that is used to make the system cool when it is heated much by working for a long time.

Thermal paste is also used in heat sink in CPU and CPU passes the air in the heat sink to make the temperature normal.

Thermal paste is very useful which installing any processor otherwise which running, the temperature will be increased in the absence of the thermal paste.

It is used to maintain the empty place between the motherboard and the processor.

7 0
3 years ago
Stonewalling sends a(n) ______ message to the other person.a. assertive messageb. confirmingc. disagreeingd. disconfirminge. com
schepotkina [342]

A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

<h3>What is finance charge of credit card?</h3>

The interest you'll pay on a loan is defined as a finance charge, and it's most commonly used in the context of credit card debt. A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

Given that,

Interest rate = 15.5%

Date: 1-3 (3 days)

Average daily balance = amount paid × day

 = $200 × 3 = $600  

Date: 4-20 (17 days)

Average daily balance = amount paid

= $300 × 17 = $5100  

Date: 21-30 (10 days)

Average daily balance = amount paid × days

= $150 × 10 = $1500  

So, total average daily balance for the month

= $(600+5100+1500)

= $7200

Now, the finance charge = $7200 × (15.5÷1

  = $93.00

Therefore, A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

To know more about finance charge refer to,

brainly.com/question/22717601

#SPJ1

6 0
1 year ago
____ was developed to enable web authors to implement interactive content on web sites, such as to animate an item, or pop up a
Gnesinka [82]
HTML (Hypertext Markup Language) was developed to enable web authors to implement interactive content on web sites, such as to animate an item, or pop up a window to point to an item. HTML is a standardized system, a program language for creating web sites that t<span>ells the Web browser how to display a Web page's words and images for the user.</span> It is the fundamental language used to develop webpages.


4 0
3 years ago
Write a loop that prints each country's population in country_pop. Sample output with input:
Nostrana [21]

Answer:

  1. country_pop = {
  2.    'China': 1365830000,
  3.    'India': 1247220000,
  4.    'United States': 318463000,  
  5.    'Indonesia': 252164800
  6. }  
  7. for key in country_pop:
  8.    print(key + " has " + str(country_pop[key]) + " people")

Explanation:

The solution code is written in Python 3.

Given a dictionary, country_pop with data that includes four country along with their respective population (Line 1-6). We can use for in loop structure to traverse through each of the key (country) in the dictionary and print their respective population value (Line 7-8). The general loop structure through is as follow:

                    for key in dict:

                         do something

One key will be addressed for each round of loop and we can use that key to extract the corresponding value of the key (e.g. country_pop[key]) and print it out.

4 0
4 years ago
Other questions:
  • What are personal skills? A manner of individual style How a person manages and expresses oneself One's ability to excel at spor
    13·2 answers
  • GoInternet, Inc., is an Internet-access service provider that is being forced to manage numerous unwanted e-mail messages from a
    10·1 answer
  • A marketing associate wants to use the Validate button to ensure an email is CAN-SPAM compliant. What information does the assoc
    5·2 answers
  • The term "Cloud" refers to what option(s) below? (Select all that apply)
    13·1 answer
  • Explain what is meant by information technology (IT). Explain what is meant by information systems (IS). Why is it important to
    7·1 answer
  • Do you think that distributed OSs use a process-communication technique different from that used by desktop OSs?
    13·1 answer
  • Nj hj hjkbh hj g7yubuyiycrtdryfrrcctcftt
    12·2 answers
  • Which of the following best describes the basic purpose of the internet?
    11·1 answer
  • What are the four steps for planning a table?​
    10·1 answer
  • Which cpu type would most likely be found in a smartphone?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!