Okay, pretty sure I got it. Wasn't hard at all once I figured out the formulas to use.
Code:
/*
@author:
@date/version:20100512.01
@title:Fine Calculator
*/
#include <stdio.h>
int main (void){
//declarations
int speed;
int fine;
//give the user information on what to do
printf("Please input the speed of the vehicle:\n");
//get input
scanf("%d",&speed);
if(speed<=45 ){
printf("No fine is given.\n");
}
else if(speed>45 && speed<56){
fine=(speed-45)*10;
printf("The fine is $%d.\n", fine);
}
else if(speed>55 && speed>66){
fine=(speed-55)*15+100;
printf("The fine is $%d.\n", fine);
}
else if(speed>65){
fine=(speed-65)*20+250;
printf("The fine is $%d.\n", fine);
}
return 0;
}
Thank you, everyone, for the help!