Answer:
Required code is given below.
Best Regards,
Please ask if any queries.
Step-by-step explanation:
#include <stdio.h>
#include <string.h>
int main(void)
{
char input[100];
printf("Enter desired auto service:\\");
scanf ("%[^\\]%*c", input);
printf("You entered: %s\\",input);
if(strcmp(input,"Oil change") == 0){
printf("Cost of oil change: $35\\");
}
else if(strcmp(input,"Tire rotation") == 0){
printf("Cost of tire rotation: $19\\");
}
else if(strcmp(input,"Car wash") == 0){
printf("Cost of car wash: $7\\");
}
else{
printf("Error: Requested service is not recognized\\");
}
return 0;
}