1 answer

12. 13. Write a program that prompts the capacity, in gallons, of an automobile fuel tank...

Question:

12. 13. Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automo
12. 13. Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling Write a C++ program that prompts the user to input the elapsed time for an event in seconds. The program then outputs the elapsed time in hours, minutes, and seconds. (For example, if the elapsed time is 9630 seconds, then the output is 2:40:30.) Write a C++ program that prompts the user to input the elapsed time for an event in hours, minutes, and seconds. The program then outputs the elapsed time in seconds. 14. 23. Newton's law states that the force, F, between two bodies of masses M, and M, is given by: F=*(,). in which k is the gravitational constant and is the distance between the bodies. The value of k is approximately 6.67x10- dyn. cm/g. Write a program that prompts the user to input the masses of the bodies and the distance between the bodies. The program then outputs the force between the bodies. 24. One metric ton is approximately 2205 pounds. Write a program that prompts the user to input the amount of rice, in pounds, in a bag. The program outputs the number of bags needed to store one metric ton of rice.

Answers

12)

C++ program :-

#include <iostream>

using namespace std;

int main() {
int capacity;
int miles_p_gallon;
  
cout<<"Enter the capacity in gallons :"<<endl;
cin>>capacity;
  
cout<<"Enter miles per gallons :"<<endl;
cin>>miles_p_gallon;
  
double no_of_miles;
  
no_of_miles = (double)capacity/(double)miles_p_gallon;
  
cout<<"The no. of miles the vehicle can drive without refueling : "<<no_of_miles<<endl;
}

Output :-

✓ Execute Mode, Version, Inputs & Arguments GCC 9.1.0 Stdin Inputs Interactive Command Line Arguments 100 11 Execute ... G Re

13)

C++ program :-

#include <iostream>

using namespace std;

int main() {
int user_seconds;
int miles_p_gallon;
  
cout<<"Enter the elapsed seconds time :"<<endl;
cin>>user_seconds;
  
int seconds;
int minutes;
int hours;
  
seconds = user_seconds%60;
minutes = user_seconds/60;
hours= minutes/60;
minutes=minutes%60;
  
cout<<"The time : "<<hours<<":"<<minutes<<":"<<seconds<<endl;
}

Output :-

V Execute Mode, Version, Inputs & Arguments GCC 9.1.0 Interactive Stdin Inputs 9630 CommandLine Arguments Execute Result CPU

.

Similar Solved Questions

1 answer
Find the current i Constants Express your answer to two significant figures and include the appropriate...
Find the current i Constants Express your answer to two significant figures and include the appropriate units. Use the mesh-current method to find the branch currents ii, i, and in in the circuit in figure (Figure 1) if th-24 V and t-78 V Value Units Submit Part B Find the current i Express your ans...
1 answer
Assume a firm uses the one hurdle rate to evaluate all potential projects. Consider two possible...
Assume a firm uses the one hurdle rate to evaluate all potential projects. Consider two possible cases: (1) The cost of capital for a project under consideration is actually below the firm’s hurdle rate, and (2) the cost of capital for a project under consideration is actually above the firm&r...
1 answer
Need help with the first part of the question, not the article part. below are Ebuy's...
need help with the first part of the question, not the article part. below are Ebuy's ratios below are Amazing company's ratios You have just received a large annual bonus at work, and have decided to invest it in stocks for your retirement. You have been analyzing different stocks an...
1 answer
The aggregate matching function in the Mortensen-Pissarides model of unemployment specifies as a function of a....
The aggregate matching function in the Mortensen-Pissarides model of unemployment specifies as a function of a. Aggregate output; the stocks of capital and labor d. Aggregate employment; Number of hires and separations b. Aggregate number of hires; number of unemployed workers and e. Aggregate numbe...
1 answer
At Sugarland Ltd. prepaid costs are debited to expense when cash is paid and unearned revenues...
At Sugarland Ltd. prepaid costs are debited to expense when cash is paid and unearned revenues are credited to revenue when the cash is received. During January of the current year, the following transactions occurred. Received $11,100 for services to be performed in the future. Paid $3,600 for casu...
1 answer
Question 1] A simple random sample of 50 items from a population with o=6 resulted in...
Question 1] A simple random sample of 50 items from a population with o=6 resulted in a sample mean of 32. a. Provide a 88% Cl for the population mean b. Provide a 80% CI for the population mean c. Provide a 60% Cl for the population mean...
1 answer
Im very confused confused on how to do this problem? [TXT Weverse] YEONJUN OCCHA?'s post. commented...
im very confused confused on how to do this problem? [TXT Weverse] YEONJUN OCCHA?'s post. commented on ||440 Due Sun 04/19/2020 11:59 pm Questions ✓ 1 [7/7] Q 5 [878] ✓ Q 9 [878] 13 [878] Grade: 76/100 Q2 [7/7] Q6 [8/8] Q 10 [878] Q 3 [7/7] Q 4 [7/7] 7 [878] C Q 8 (0/8) Q 11 (0/...
1 answer
Two triangles with the same corresponding sides lengths will be congruent is known as the?
Two triangles with the same corresponding sides lengths will be congruent is known as the?...
1 answer
Brief Exercise 9-04 a-b At the end of 2020, Sandhill Co. has accounts receivable of $755,200...
Brief Exercise 9-04 a-b At the end of 2020, Sandhill Co. has accounts receivable of $755,200 and an allowance for doubtful accounts of $60,200. On January 24, 2021, the company learns that its receivable from Megan Gray is not collectible, and management authorizes a write-off of $6,600. Prepare the...
1 answer
Excel Problem (to be used with the data in the Excel file): Namata Appliances sells refrigerators....
Excel Problem (to be used with the data in the Excel file): Namata Appliances sells refrigerators. The model seen in the data file is relatively inexpensive. Weekly demand for this model is relatively stable though there is enough variation to challenge management at Namata. Sometimes demand is lowe...
1 answer
Required information [The following information applies to the questions displayed below.) Finlon Upholstery, Inc. uses a...
Required information [The following information applies to the questions displayed below.) Finlon Upholstery, Inc. uses a job-order costing system to accumulate manufacturing costs. The company's work-in- process on December 31, 20x1, consisted of one job (no. 2077), which was carried on the yea...
1 answer
An object with a mass of #6 kg# is revolving around a point at a distance of #8 m#. If the object is making revolutions at a frequency of #6 Hz#, what is the centripetal force acting on the object?
An object with a mass of #6 kg# is revolving around a point at a distance of #8 m#. If the object is making revolutions at a frequency of #6 Hz#, what is the centripetal force acting on the object?...
1 answer
Dy If a ER-1} and b ER({1}, the solution of x- dx + a -y= 1-b...
dy If a ER-1} and b ER({1}, the solution of x- dx + a -y= 1-b a +1 -xy' is 1-b Select one: O a. y 1-6 = x+C+xa O b.y = x+C+x2-1 ocyl-6 =C+x-a od y1-b = x+cx-a oe.yB-1 = x+c+xQ O f. y = x+C+x-2 o g. 71-b = x+C O h. y = x+c+x-a...
1 answer
20 points Problem 4: Extended Euclidean Algorithm Using Extended Euclidean Algorithm compute the greatest common divisor...
20 points Problem 4: Extended Euclidean Algorithm Using Extended Euclidean Algorithm compute the greatest common divisor and Bézout's coefficients for the pairs of integer numbers a and b below. Express the greatest common divisor as a linear combination with integer coefficients) of a an...
1 answer
A Ask for help desk to contact Diane Mayfair for a password reset. B Follow up...
A Ask for help desk to contact Diane Mayfair for a password reset. B Follow up with the Chief Financial Officer (CFO) regarding his login issues. C Check logs for activities by the dmayfair account D Contact Doug Smith to setup an account in the system. A security analyst is reviewing the overnight ...
1 answer
Personal Budget At the beginning of the school year, Katherine Malloy decided to prepare a cash...
Personal Budget At the beginning of the school year, Katherine Malloy decided to prepare a cash budget for the months of September, October, November, and December. The budget must plan for enough cash on December 31 to pay the spring semester tuition, which is the same as the fall tuition. The foll...
1 answer
Jones Co. manufactures a single product which sells for $60 each and whose variable costs are...
Jones Co. manufactures a single product which sells for $60 each and whose variable costs are $40 each. Fixed costs are $600,000 for the year. What is the break-even point in dollars? In units? 1....
1 answer
The electric potential at a point is large, what can you conclude about the behavior of...
the electric potential at a point is large, what can you conclude about the behavior of the electric field there?...
1 answer
5.2 kip-ft 9.5 kip/ft I. PROBLEMS 3) (25 points) The cantilivered W16x45 beam is made of...
5.2 kip-ft 9.5 kip/ft I. PROBLEMS 3) (25 points) The cantilivered W16x45 beam is made of A-36 steel and is subjected to the loading shown. Determine: a) the shear and bending moment diagrams. b) the maximum deflection (in in) at the point B and maximum slope (in rad) of point B using superposition, ...