The program should input the speed from the keyboard and display the appropriate message on the screen dependent on the speed the car is travelling.
under 31mph-No action
under 41mph-warning
under 56mph-summons
over 56-automatic ban
this is how far i got
Code:
#include <stdio.h>
void main (void)
{
int x;
printf ("Enter teh car speed in mph: ");
scanf ("%d", &x);
if (x<31)
printf ("No action");
}
I don't know what to do next. I know I have to use else/switch statement....but don't know how to use it. can any one help me?