Hi. Only being pragramming for a few weeks now, hence the questions.
For our latest assignment, we have been giving three codes to write, one of which is required to take price and VAT, and calculate the total cost. Here is the code so far:
Code:
/* VAT Calculation*/
/* By Luke Sowersby */
/* 05/03/08 */
#include <stdio.h>
#include <conio.h>
#include <string.h>
main()
{
float vat, price;
printf("Please enter the VAT percentage:\n");
scanf("%f",&vat);
printf("Please enter the item value:\n");
scanf("%f",&price);
float price_to_cost_conversion(price, vat)
{
float cost;
cost=((1+(vat/100))*price);
return cost;
}
printf("The total price is %f",price_to_cost_conversion);
}
I was just hoping someone could point me in the right direction please, as to were i am going wrong.
Thanks,
Luke.