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
True or false: Concurrent validation is more time consuming to measure than predictive validation because it involves a wait per
nikdorinn [45]

This is false, I hope this helps you with your task

4 0
2 years ago
Creating a newsletter
pav-90 [236]
This isn’t helpful considering no one knows what type of news letter you want
6 0
2 years ago
Cloud computing service providers manage different computing resources based on the services they offer. Which resources do IaaS
eimsori [14]

Answer:

1. C.operating system

2. A.applications

Explanation:

1. The Iaas is the infrastructure as a service, and storage, server, and network are the infrastructures. However, the Operating System is the platform, and hence it is the correct option for the first blank. We need to understand the exact meaning of the IaaS, PaaS and the SaaS as well as MaaS, to better understand cloud computing.

2. In the second case, we have been asked about the option that is not being covered by the PaaS, and Paas stands for the platform as a service. And the interface, storage, and virtualization is the platform whereas the Applications is an example of software. And it is being managed by SaaS, Hence, the correct option is A. Applications.

7 0
3 years ago
The natural functions of Earth seem all _____ in one way or another.
Sonja [21]
Would it be Similar ?
4 0
3 years ago
Files containing ____ are available from a variety of sources.
alexandr402 [8]
Important things maybe. I am in Graphic design so I know little
6 0
3 years ago
Other questions:
  • Header and footer elements such as worksheet name, current date, and time are _____ elements, they change as your worksheet does
    12·1 answer
  • About ___% of children score within one standard deviation above or below the national average in intelligence.
    5·1 answer
  • A(n) _____ allows a user to choose specific files to back up, regardless of whether or not the files have been changed.
    9·1 answer
  • Technician A says that a system should be recharged with refrigerant until the condenser temperature is equal to the ambient tem
    9·1 answer
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • The 'WIMP' environment is much more user friendly,why?​
    11·2 answers
  • The question of ________ arises when considering the way in which online marketers gather consumers’ information over the Intern
    6·1 answer
  • Python
    6·1 answer
  • How will you identify a file type on your computer?
    5·1 answer
  • Document accurately describes the differences between servers and computers and between local and wide area networks. Document p
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!