I can't figure this out
this is the code
Code:
#include <stdio.h>
float Total_Revenue(float,float);
int main(void)
{
float price = 0.00;
float quantity = 0.00;
float revenue;
printf("Enter price: ");
scanf("%.2f" , price);
printf("\nEnter quantity: ");
scanf("%.0f", quantity);
revenue = Total_Revenue(price,quantity);
printf("The total revenue is %.2f" , revenue);
return 0;
}
float Total_Revenue(float x, float y)
{
float price;
float quantity;
return price * quantity;
}
Here's the output
------------------------------------------------------------------------------------------------------------
Enter price: 5.00
Enter quantity: The total revenue is 0.00Press any key to continue...
------------------------------------------------------------------------------------------------------------
why won't it let me enter the quantity