1) An employer has decided to award a weekly pay raise to all employees by taking the square root of the difference between his weight and the employee’s weight. For instance, an employee who weighs 16 pounds less than the employer will get a $4 per week raise. The raise should be in whole dollars (an int). Write a class file that prompts the user for the employee and the employer weight. Please output the correct raise amount making sure that all inputs are included in the output statement.

Answers

Answer 1

Answer:

Written in C++

#include <iostream>

#include<cmath>

using namespace std;

int main(){

   int weight1, weight2, diff;

   cout<<"Employees Weight: ";

   cin>>weight1;

   cout<<"Employers Weight: ";

   cin>>weight2;

   diff = abs(weight1 - weight2);

   float pay = round(sqrt(diff));

   cout<<pay;

   return 0;

}

Explanation:

I've added the source file as an attachment where I used comments as explanation


Related Questions

1. Discuss data processing concepts and the representation of data in the computer


2. Explain how they work together to process data

Answers

Answer:

gkvjbdsvjnmfbhui jgbfdshjcxvabgsuciusgBFIULWGSfuRyt vqwyrgfgweVGYGTV7BWUIEGDWYUGDCYg

Explanation:

Other Questions
The three sides of a triangle are: 16, 12 and 22. Is the triangle Acute, Right, or Obtuse? The formula V=BH/3 shows how to find the volume of a pyramid. SOLVE for B.A B=3V/HB) B=3VHB=3V-HD B=3V+H What is the best reason for the scientific community to accept a theory? The theory is supported by all the available observations and data. An award-winning scientist proposed the theory. The majority of the general public agrees with the theory. The theory contradicts an older theory. ASAP PLEASE :)How can we add kinetic energy to a baseball or football? WILL MARK AS BRAINLIESTSolve the following equation and then check your solution. Show all of your work.-17+n/5=33 how would you describe the size of atoms and molecules in your own words ? how do you get from mass to moles in this problem? evelyn would stop at nothing to win the contest What are the products of cellular respiration ? 20 twenty-sevens minus 1 twenty-seven A sharecropper in the south usually need How did the differences between the eastern and western portions of the Roman Empire arise? 3n + 6 = 18. What is the value of n The graph shows a proportional relationship. Which equation matches the graph? Evaluate the expression when x = 12 and y = 2.x above 3y 38 2 125 8 All of the following resulted from the American Revolution EXCEPTAmerica gained its independence from Great Britainb. America returned Florida to Spain.C Spain ceded Louisiana to Americad. Spain granted America and Great Britain trading rights along the Mississippi River Guard cells close the __________ (stomata/epidermis) to prevent excess water loss. EARTH SCIENCE, PLEASE HELP IM DESPERATE!What is a temperature inversion in the atmosphere?The Stratosphere and the Thermosphere have temperature inversions in them.Describe what causes the temperature inversions in each of these two layers the atmosphere? I'm so clueless of this I need some help Determine which scenario could be found using P(A) = (5C2)(8C1)/13C3 Frank naci en 1933 y muri en 1946 a los 50 aos, cmo puede ser esto?