Need help with "if" statements
I am trying to create a vending machine program using "if" statements and I need to get the user to “insert” their money. Since they can’t physically insert money, the program needs to ask them how much they wish to insert and have to check and see if they entered at least $1.00 (using the “if” statements). If they do not insert at least $1.00, it will give them an error message and NOT give them the option to purchase a drink.
So far this is the coding that I have done using the Miracle C compiler. When I try to compile it, it gives me an error. I am just starting out getting familiarized with the C language and any help would be appreciated kindly.
printf ("%s","Welcome to Harry's Vending Machine\n");
printf("Enter a value:\n");
if (a == 1)
printf ("\nPress 1 for 7 up\n");
printf ("\nPress 2 for Coca Cola\n");
printf ("\nPress 3 for Pepsi\n");
printf ("\nPress 4 for Bottled Water\n");
printf ("\nPress 5 for Dr. Pepper\n");
printf("Thank you for your purchase\n");
printf ("\nEnjoy your refreshing drink and don't forget your change\n");
if ("d > a")
printf("Please insert correct amount\n");