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
Sholpan [36]
3 years ago
7

Description:

Computers and Technology
1 answer:
Nastasia [14]3 years ago
8 0

Answer:

The programming language is not stated (I'll answer using C++)

#include <iostream>

using namespace std;

int convert(float miles)

{

   return miles * 5280;

}

int main() {

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   while(response == 'y')

   {

   cout<<"How many miles did you walk?. ";

   cin>>miles;

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

   cout<<"Continue? (y/n): ";

   cin>>response;

   }

   cout<<"Bye!";

   return 0;

}

Explanation:

Here, I'll explain some difficult lines (one after the other)

The italicized represents the function that returns the number of feet

<em>int convert(float miles) </em>

<em>{ </em>

<em>    return miles * 5280; </em>

<em>} </em>

The main method starts here

int main() {

The next two lines gives an info about the program

   cout<<"Console:"<<endl;

   cout<<"Hike Calculator"<<endl;

   float miles;

   char response;

This line prompts user for number of miles

   cout<<"How many miles did you walk?. ";

   cin>>miles;

This line calls the function that converts miles to feet and prints the feet equivalent of miles

   cout<<"You walked "<<convert(miles)<<" feet"<<endl;

This line prompts user for another conversion

   cout<<"Continue? (y/n): ";

   cin>>response;

This is an iteration that repeats its execution as long as user continue input y as response

<em>    while(response == 'y') </em>

<em>    { </em>

<em>    cout<<"How many miles did you walk?. "; </em>

<em>    cin>>miles; </em>

<em>    cout<<"You walked "<<convert(miles)<<" feet"<<endl; </em>

<em>    cout<<"Continue? (y/n): "; </em>

<em>    cin>>response; </em>

<em>    } </em>

   cout<<"Bye!";

You might be interested in
Crees que es necesario que el estado Peruano, proponga nuevamente el aislamiento desde este 22 de diciembre al 02 de enero del 2
Nady [450]

Answer:

Efectivamente, es necesario que el gobierno de Perú establezca un nuevo aislamiento lo antes posible. Este período de fiestas, que va desde fines de diciembre hasta principios de enero, es un período de reuniones familiares y sociales, con lo cual dado el marco de una segunda oleada de coronavirus y la aparición de una nueva cepa de esta enfermedad en Gran Bretaña, es necesario extremar las precauciones y cuidados para que la situación no vuelva a complicarse como sucedió en el invierno pasado. Por lo tanto, es una necesidad tomar ciertas medidas restrictivas para evitar que la situación pase a mayores.

8 0
2 years ago
What is a device driver​
sleet_krkn [62]

Answer:

Explanation:

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer. ...

4 0
2 years ago
Read 2 more answers
If im downloading a game at 4mb/s how many minutes would it take to download 25 GB
xxMikexx [17]

Answer:

File size  

25  GB  

Connection type Download speed Download time

Modem    28,8 kbit/s                   2071:15:40

Modem     56,6 kbit/s                         1065:13:12

ADSL       256 kbit/s                         233:01:00

ADSL       512 kbit/s                         116:30:30

ADSL       1 Mbit/s                                     59:39:08

ADSL             2 Mbit/s                                     29:49:34

ADSL             8 Mbit/s                                     07:27:23

ADSL             24 Mbit/s                                     02:29:07

LAN             10 Mbit/s                                                 05:57:54

LAN             100 Mbit/s                                     00:35:47

Turbo 3G 7,2 Mbit                           08:17:06

4G             80 Mbit/s                                     00:44:44

Hopefully this helps somewhat

7 0
2 years ago
Read 2 more answers
You have found statistics on the Internet that you would like to use in your speech.
miss Akunina [59]

Answer:

You cite them correctly and that the statistics are real.

Explanation:

5 0
3 years ago
Final one bit l y links are a virus that will corrupt your files do not go on it
diamong [38]

Answer:

ok mk

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • give two main reasons that should be considered when preparing and deploying a functional restoral scenario.
    5·1 answer
  • A layer of control in each communicating device that provides functions such as flow control, error detection, and error control
    13·1 answer
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • A firewall, when properly implemented, can prevent most attacks on your system.
    11·1 answer
  • Example: An amount of $1,500.00 is deposited in a bank paying an annual interest rate of 4.3%, compounded quarterly. What is the
    5·1 answer
  • 100 POINTS PLEASE HELP ASAP!!!!!
    5·2 answers
  • Read the scenario below and then answer the
    14·1 answer
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • Which one is exit controllefd loop ?<br>1.while loop <br>2. for loop<br>3. do loop<br>4. none <br>​
    11·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!