Did I say the school is using Miracle C compiler. Version 3.2, I know this might be older but it is what I have to work with.
Did I say the school is using Miracle C compiler. Version 3.2, I know this might be older but it is what I have to work with.
Tried as you suggested:
color(red);
printf("\nI am sorry that is not a valid choice!\n\n");
What I get is an error that says cannot find variable "red"
Are you printing this out to the command line?
This is a program for school that asks the user for a dollar amount and then displays the tax and total sales for the price entered. I just want to have the different stores show up in different colors.
I have this except from my program and would like to change the line showing the error to say red, how would I do that?
switch (choice)
{
case 1:
{
printf("\nThank you for choosing the Del Mar Store");
printf("\nThe price you entered is: $%10.2f<<<<\n", (price));
printf("The Sales tax on that item is: $%10.2f<<<<\n", (DMPrice));
printf("Bringing your Total Sales to: $%10.2f<<<<\n", (DMTotal));
} break;
case 2:
{
printf("\nThank you for choosing the Encinitas Store");
printf("\nThe price you entered is: $%10.2f<<<<\n", (price));
printf("The Sales Tax on that item is: $%10.2f<<<<\n", (ENPrice));
printf("Bringing your Total Sales to: $%10.2f<<<<\n", (ENTotal));
} break;
case 3:
{
printf("\nThank you for choosing the LaJolla Store");
printf("\nThe price you entered is: $%10.2f<<<<\n", (price));
printf("The Sales Tax on that item is: $%10.2f<<<<\n", (LJPrice));
printf("Bringing your Total Sales to: $%10.2f<<<<\n", (LJTotal));
} break;
default:
//Used to let user know they made an invalid Store Choice.
printf("\nI am sorry that is not a valid choice!\n\n"); This is the line I would like to change to "red" so they know that they made a mistake.
}