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);
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.