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
deff fn [24]
4 years ago
15

Write a C++ program that will convert distance measurements from miles to kilometers. Specifically, the program needs to convert

0, 10, 20, 30, 40 , 50, 60, 70, 80, and 90 miles to kilograms displaying both the number of miles and the number of kilograms on the same line.
Computers and Technology
1 answer:
Sedbober [7]4 years ago
7 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// loop that will convert 0,10,20.....90 miles to kilometer

   for(int a=0;a<=90;a=a+10)

   {

   // convert miles to kilometer

       double kilo_m=a*1.609;

       // print the result

       cout<<a<<" miles is equal to "<<kilo_m<<" kilometer."<<endl;

   }

return 0;

}

Explanation:

Run a for loop from 0 to 90.First change 0 miles to kilograms by multiply 1.609. Then Increment "a" by 10 until it "a" is less or equal to 90.And change them into kilometer.

Output:

0 miles is equal to 0 kilometer.

10 miles is equal to 16.09 kilometer.

20 miles is equal to 32.18 kilometer.

30 miles is equal to 48.27 kilometer.

40 miles is equal to 64.36 kilometer.

50 miles is equal to 80.45 kilometer.

60 miles is equal to 96.54 kilometer.

70 miles is equal to 112.63 kilometer.

80 miles is equal to 128.72 kilometer.

90 miles is equal to 144.81 kilometer.

You might be interested in
Calculate how many different pixel colours could be formed if one of the bytes gives the intensity of the red colour, one of the
Elena L [17]

Answer: The three RGB colors are each 8-bits (possible values [0.. 255], 2 to the power of 8 = 256) of each of Red, Green, and Blue. The three 8-bit RGB components can create up to 256×256×256 = 16.7 million possible RGB color combinations, called 24-bit "color".

Explanation:

6 0
3 years ago
Write a method that draws a circle and a square that is centered in a DrawingPanel. The method will take in the width and height
Katarina [22]

Answer:

public static void drawGraphics (Graphics g, int width, int height) {

   int r = Math.round(width/2);

   int x = 45;

   int y = 30;

     g.setColor(Color.RED);

   g.fillRect(x, y, width, height);

   g.setColor(Color.BLUE);

   g.fillOval(Math.round(x/2), Math.round(y/2), r, r);

}

Explanation:

The Java method "drawGraphics" of the Graphics class accepts draws a square with the "fillRect()" method of the Graphics class object and at its center, a circular path is drawn as well.

3 0
3 years ago
After submitting a résumé by mail, how long should you wait before following up with an employer? a. 1 day b. 2-3 days c. 1 week
inn [45]
C is the correct answer. One week is an appropriate amount of time to wait when mailing a resum<span>é</span><span>, because it takes at least a couple of days for mail to arrive. However, you still want a decisive response, so two weeks is probably a little too long.</span>
7 0
3 years ago
Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
larisa [96]
I think this answer is b
5 0
3 years ago
Read 2 more answers
Write a program named guess_number.py. Use NumPy to generate a random number between 1 and 100. Accept int input and ask user to
Gala2k [10]

Answer:

download the .txt file and change the file name to guess_number.py then run it in a python interpreter. I used Python 3.9.6 for this project and I used Visual Studio Code as my IDE.

Explanation:

The code has comments that tell you what is happening.

I hope this helped :) If it didn't please let me know what went wrong so I can fix it.

Download txt
3 0
3 years ago
Other questions:
  • What is a geotag?
    10·1 answer
  • You can create a ____ partition to hold files that are created temporarily, such as files used for printing documents (spool fil
    13·1 answer
  • If userA wants to send a secure message to userB using an asymmetric cryptographic algorithm, which key does userB use to decryp
    11·1 answer
  • "Currency" is a field data type ,it represents Date or time values<br> True or false tho?
    12·1 answer
  • The establishment called ABC Enterprise requires a Java program to keep a database of the inventory of the products that it sell
    8·1 answer
  • Send this as a Python file. Note: this is an example where you have the original file, and are writing to a temp file with the n
    7·2 answers
  • You should always buy the biggest camera bag that you can find for extra equipment
    7·2 answers
  • How to jailbreak ios 9.2 ? Is there anyway???!!!!
    12·1 answer
  • Every modern nation has a Central Bank. Which of the following is the Central Bank for these United States?
    14·2 answers
  • Operational level management can be supported by the systems except Select one: 01. Transaction Processing System 2. Manufacturi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!