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

C language Problem The main factors being considered at this time are ramp mater

ID: 3788371 • Letter: C

Question

C language Problem

The main factors being considered at this time are ramp material, crate weight and the inclination of the ramp. In order to calculate the force required to overcome the friction of the ramp, the static friction equation is needed. It is shown below: HFN friction Where u is the coefficient of static friction and F is the normal force at the interface between objects. Since the normal force is always perpendicular to the interface between objects, it will be necessary to isolate the force of gravity on the wooden crates acting perpendicular to the ramp interface. The following diagram shows the forces acting on the crates, where the force of gravity has been broken up into x and y components using trigonometry (x is parallel to the ramp; y is perpendicular to it) push 90 -0 mg sin 0 mg cos e friction mg Diagram of the different forces acting on a crate while being pushed up a ramp. The diagram also shows the original weight force mg acting on the crate; however, the two components mg cos 0 and mg sin 0 have exactly the same effect on the crate as does the original weight force mg

Explanation / Answer

#include <stdio.h>
#include <math.h>

#define PI 3.14159265
#define g 9.8
int main()
{
   char material;
   double angle;
   char unit;
   char size;
   double cof;
   int mass;
   int maxForce=550;
   printf("Enter Material(C,W,B,I): ");
scanf("%c",&material);
   printf("Enter Angle: ");
scanf("%lf",&angle);
   printf("Enter Unit of angle(R,D): ");
scanf("%c",&unit);
   printf("Enter size of crate(S,M,L): ");
scanf("%c",&size);
  
   if(size=='S'){
mass=25;
}else if(size=='M'){
mass=75;
}else if(size=='L'){
mass=125;
}else{
printf("Invalid size");
       return;
}
   if(unit=='D'){
double val = PI / 180;
       angle=angle*val;
}else if(unit=='R'){
  
}else{
printf("Invalid Unit");
       return;
}
  
   if(material=='C'){
cof=0.62;
}else if(material=='W'){
cof=0.5;
}else if(material=='B'){
cof=0.6;
}else if(material=='I'){
cof=0.49;
}else{
printf("Invalid Material");
       return;
}
   double FN=mass*g*cos(angle);
   double Ffriction=cof*FN;
   double Fgx=mass*g*sin(angle);
   double Ftotal=Ffriction+Fgx;
   printf("The estimated force required to move the crate is %lf ",Ftotal);
   if(Ftotal<maxForce){
       printf("The Average human could move this crate up the ramp ");
   }else{
       printf("The Average human could not move this crate up the ramp ");
   }
return;
}