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
Crank
3 years ago
5

Problem 2 (40 points)-Write a program. Submit a file named weight.cpp Create a program that continuously allows a user to enter

his or her weight in either pounds or kilos. The program should then convert the given weight. Possible Sample Run 1 (your program does not have to match the following exactly, but should have the same functionality): Please enter your name and weight. James 182 pounds Hi James- you weigh 82.5 kilos. Please enter your name and weight. Connor 78 Not enough info to convert. Please enter your name and weight. Connor 78 kilos Hi Connor-you weigh 171.9 pounds. Please enter your name and weight. exit Exiting…
Computers and Technology
1 answer:
JulsSmile [24]3 years ago
4 0

Answer: here

Explanation:

Hi James- you weigh 82.5 kilos. Please enter your name and weight. Connor 78 Not enough info to convert. Please enter your name and weight. Connor 78 kilos Hi Connor-you weigh 171.9 pounds. Please enter your name and weight.

You might be interested in
Can both mediated interpersonal communication and mass communication has an ability to reach huge number of recipients or audien
mars1129 [50]

Answer:

Explanation:

Somewhat

7 0
2 years ago
Which of the following shows the assignment of a string to a variable? Select 3 options.
satela [25.4K]

Answer:

23, (23)

Explanation:

7 0
2 years ago
Read 2 more answers
Write the definition of a function typing_speed, that receives two parameters. The first is the number of words that a person ha
Lera25 [3.4K]

Answer:

The definition of function is as follows:

def typing_speed(number_of_words,Time_Interval):

number_of_words>=0  

Time_Interval>0

speed=float(60*number_of_words/Time_Interval)

return speed

Explanation:

Above function is defined step-by-step as follows:

        def typing_speed(number_of_words,Time_Interval):

  • A function named typing speed has two arguments, num_of_words and Time_Interval.

                             number_of_words>=0  

                             Time_Interval>0

  • The variable number_of_words is the number of words entered that a person enters, they must be greater than or equal to 0. Where as Time_Interval is the variable for counting the time span in seconds, it must be greater than 0.

                    speed=float(60*number_of_words/Time_Interval)

                    return speed

  • For determining result firstly the seconds are converted int minutes by multiplying with 60 and number_of_words is divided with Time_Interval in order to get words per minute. The return value will give speed which has data type float.

4 0
2 years ago
9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
AleksandrR [38]

Answer:

#include <iostream>

using namespace std;

int * reverse(int a[],int n)//function to reverse the array.

{

   int i;

   for(i=0;i<n/2;i++)

   {

       int temp=a[i];

       a[i]=a[n-i-1];

       a[n-i-1]=temp;

   }

   return a;//return pointer to the array.

}

int main() {

   int array[50],* arr,N;//declaring three variables.

   cin>>N;//taking input of size..

   if(N>50||N<0)//if size greater than 50 or less than 0 then terminating the program..

   return 0;

   for(int i=0;i<N;i++)

   {

       cin>>array[i];//prompting array elements..

   }

   arr=reverse(array,N);//function call.

   for(int i=0;i<N;i++)

   cout<<arr[i]<<endl;//printing reversed array..

   cout<<endl;

return 0;

}

Output:-

5

4 5 6 7 8

8

7

6

5

4

Explanation:

I have created a function reverse which reverses the array and returns pointer to an array.I have also considered edge cases where the function terminates if the value of the N(size) is greater than 50 or less than 0.

8 0
2 years ago
Which column and row references are updated when you copy the formula: =F$5+12?
KIM [24]

Answer:

Column F and row 5

7 0
3 years ago
Other questions:
  • You can execute three main types of linux commands. what are they?
    8·1 answer
  • In order to achieve a win-win solution, all parties involved should negotiate a solution. True or False ?
    13·2 answers
  • What is the name of the organization responsible for assigning public ip​ addresses?
    13·1 answer
  • Where will the CPU store data for easy access and quick retrieval during these computations?
    13·1 answer
  • A tool you might use to manipulate an image, such as a photograph, into a seamless repeating texture would be:
    7·2 answers
  • What would be the best engine to use for making a 3d beginner game
    9·1 answer
  • An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________
    8·1 answer
  • A gui allows you to interact with objects on the screen such as icons and buttons true or false
    15·1 answer
  • What is a best practice when approaching an automation effort?
    6·1 answer
  • How can she change that value so it is reflected in the chart in her presentation?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!