Jupiter please do it correctly and show result The speeding
Solution
// program is in C language.
// program for implementing speeding fine based on given requirements. fine =60 and for every 1 mph = $ 5.00 if construction violated(\'y\') fine doubled and
// speed over 90 gets further 250 extra fine.
// including libraries
#include<stdio.h>
//declaration of test and speeding functions.
void test();
int speeding(int , int ,char );
int main(){
test(); // calling test function.
}
// speeding functin definition.
int speeding(int sl, int cs,char c_l){
int value = 0;
if(sl<cs){ // if clock speed crosses speeding limit.
value=60+(cs-sl)*5;
if(c_l==\'Y\' || c_l == \'y\'){ // if construction violation occurs.
value=value*2;
}
if(cs>90){ // if clock speed over 90
value=value+250;
}
}
return value; // speeding function returns value never prints.
}
// test function definition.
void test(){
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",35,45,\'y\',speeding(45,35,\'y\'));// calling speeding function and printing
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",55,45,\'y\',speeding(45,55,\'y\'));
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",55,45,\'n\',speeding(45,55,\'n\'));
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",95,45,\'y\',speeding(45,95,\'y\'));
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",95,45,\'n\',speeding(45,95,\'n\'));
printf(\"speeding violation fine for speed %d in %d mph zone(construction = %c) $%d.00\ \",95,80,\'n\',speeding(80,95,\'n\'));
}
// end of prgram
// please comment your response. it helps me to provide any additional information you needed.

