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
Tatiana [17]
3 years ago
11

Write a program that calls a function to change a variable value from miles to kilometers.

Computers and Technology
1 answer:
Aneli [31]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

void miles_to_km(float &miles)//function to convert miles to kilo meters.

{

   miles=miles*1.6;

}

int main() {

   float miles;

   cout<<"Enter the miles"<<endl;

   cin>>miles;//taking input of the miles..

  miles_to_km(miles);//calling function that converts miles to km..

   cout<<"The number of km is "<<miles<<endl;//printing the km.

return 0;

}

Output:-

Enter the miles

54

The number of km is 86.4

Explanation:

I have created  a function miles_to_km of type void which has the argument miles passed by reference.In the function the variable miles is converted to kilo meters.Then in the main function the function is called with the value prompted from the user.Then printing the changed value.

You might be interested in
What is the most consistent item regardless of the software used in BI?
vodomira [7]

Answer Explanation:

Business intelligence is defined as the strategies and technologies used by companies for the data analysis of business information it tell us also about predictive views of business operation.

THE MOST CONSISTENT ITEMS REGARDLESS OF SOFTWARE USED IN BI ARE :

  • data analyst has the most responsibility of BI he is the most important part of BI
  • It is the interconnected process of inspection changing and modeling
  • data analysis is hugely aided by data mining
5 0
3 years ago
Write a spellcheck() method that takes a word as a parameter and returns true if it is in the dictionary array. It should return
makkiz [27]

Answer:

See attached file for detailed code.

Explanation:

See attached file.

Download txt
6 0
3 years ago
Why is it necessary to include units when measuring and dimensioning?
antoniya [11.8K]
Because the measurement is relative to the unit. For example:

A measurement is six. But could be 6 inches, 6 yards, 6 nm, 6 feet, six as a quantity, six packages, six items, etc.

So until you specify the unit, that number means nothing.
7 0
3 years ago
This is all the points I have pls help
bezimeni [28]
Illustrations -------
5 0
3 years ago
Read 2 more answers
Assume the variable costOfBusRental has been declared as an int and assigned the amount that it costs to rent a bus. Also assume
Basile [38]

It’s a total price divided to a number of riders involved. So costPerRider = costOfBusRental/maxBusRiders

4 0
3 years ago
Other questions:
  • A network design engineer has been asked to design the IP addressing scheme for a customer network. The network will use IP addr
    6·1 answer
  • Command icons under the following file tab in its function
    14·1 answer
  • Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "
    9·1 answer
  • A company used computer auditing techniques to compare employees' telephone numbers with vendors' telephone numbers. This is an
    10·2 answers
  • What can you hold in your left hand but not in your right? for creese7911 and maranda66
    7·2 answers
  • You want to search for contacts in your email program. You enter the person’s first name and last name in the search box. You wa
    10·2 answers
  • Hey IM new uh what is this?
    5·1 answer
  • What is the purpose of extent in lines in engineering drawing
    12·1 answer
  • ما هي طرق اختبار الخرسانة <br>​
    14·1 answer
  • Make a Flow Chart From this C Programming Language Code
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!