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

Hi guys, im using C to write this program. i\'m not sure how can i include the f

ID: 640343 • Letter: H

Question

Hi guys, im using C to write this program.

i'm not sure how can i include the function (speed_ratio) in my code but this's what i got so far.

____________________________________________________

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

int main(void){
   double max, min, ratio;

   printf("Enter the maximum speed");
   scanf_s("%lf, &max");

   printf("Enter the minimum speed");
   scanf_s("%lf, &min");

   ratio = sqrt(pow(max / min, 5));
   printf("The ratio between successive speeds of a six-speed gearbox ");
   printf("with maximum speed %lf rpm and the minimum speed %lf rpm ",max,min);
   printf("is %.2f ", ratio);
   return(0);
}

Explanation / Answer

Hi,

Here is the answer :

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

int main(void){
   double max, min, ratio;

   printf("Enter the maximum speed");
   scanf_s("%lf, &max");

   printf("Enter the minimum speed");
   scanf_s("%lf, &min");

   ratio = pow(max / min, 5);
   printf("The ratio between successive speeds of a six-speed gearbox ");
   printf("with maximum speed %lf rpm and the minimum speed %lf rpm ",max,min);
   printf("is %.2f ", ratio);
   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