Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

INTRODUCTION: The total work that an automobile will produce as it accelerates u

ID: 3876111 • Letter: I

Question

INTRODUCTION: The total work that an automobile will produce as it accelerates up a hill can be easily computed providing that the road resistance and aerodynamic friction are neglected, and the mass of the automobile is constant. The govening equations are based on two forms of work, gravitational and acceleration, as the automobile ascends the hill. The two equations are Where: W is the computed gravitational work in J (Goules). Wa is the computed acceleration work in J (Goules) m is the mass of the automobile in kg g is the gravitational acceleration constant 9.81 m/s2 z1 is the horizontal position of the ground which is zero meters z2 is the computed vertical height of the hill in meters v1 is the computed initial velocity of the automobile in m/s v2 is the computed final velocity of the automobile in m/s The vertical distance z, s computed by: Z2-L * sin Where: L is the road length in meters is the angle of the hill in degrees Total work is computed by: w-wHK ASSIGNMENT: Write a C program that will compute the total work done by an automobile accelerating up a hill after entering the automobile weight in kg, the initial speed in mph, the final speed mph, the road length in meters, and the hill angle in degrees. The program must compute the initial and final speeds in m/s and the vertical height ofthe

Explanation / Answer

#include <stdio.h>

int main(void) {

// your code goes here

float g = 9.81,l;

float weight,initialspeed,finalspeed,roadlength,hillangle,gravitationalwork,accelerationwork,totalwork;

printf("******************************************************** ");

printf("TOTAL WORK DONE ");

printf("enter vehicle weight in kilogram ");

scanf("%f",&weight);

printf(" enter initial speed in mph ");

scanf("%f",&initialspeed);

printf(" enter final speed in mph ");

scanf("%f",&finalspeed);

printf(" enter road length in meters ");

scanf("%f",&roadlength);

printf(" enter hill angle in degree ");

scanf("%f",&hillangle);

printf(" ");

printf(" ");

printf(" ");

initialspeed = initialspeed * 0.44704;

finalspeed = finalspeed * 0.44704;

l = roadlength * sin(hillangle);

gravitationalwork = weight * g * (l - 0);

accelerationwork = (weight*((finalspeed*finalspeed)-(initialspeed*initialspeed)))/2;

totalwork = gravitationalwork+accelerationwork;

printf("AUTOMOBILE WEIGHT : %0.1f kg",weight);

printf(" INITIAL SPEED : %0.3f mph",initialspeed);

printf(" FINAL SPEED : %0.3f mph",finalspeed);

printf(" ROADLENGTH : %0.1f m",roadlength);

printf(" HILLANGLE : %0.1f deg",hillangle);

printf(" GRAVITATIONALWORK : %0.1f J",gravitationalwork);

printf(" ACCELERATION WORK : %0.1f J",accelerationwork);

printf(" TOTAL WORK : %0.1f J",totalwork);

printf(" ********************************************************");

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote