Hi Everyone! First of all, please excuse the super simple for dummies question. I'm a total newbie to programming and i'm taking a C class online so it's difficult to get feedback and answers to questions.
In the below code, can someone please explain why I get an error for 'Left operand is type float / right operand is type const float'? I have spent hours trying to figure this out to no avail! And yes, this is a homework question, but i'm not looking for the complete answer, just help with this one error. Thanks in advance!
#include <stdio.h>
const float TAXRATE = 0.056;
int main(void)
{
float price;
int dollar, cent;
printf("Please enter the price of your item.\n");
scanf("%f", &price);
dollar = price * TAXRATE
cent = price % TAXRATE;
printf("Item price $%2f with sales tax is %d dollars and %d cents.", price, dollar, cent);