1. ## VAT Calculation

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;

scanf("%f",&vat);
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.

2. Also, note that the following code:

Code:
`printf("The total price is %f",price_to_cost_conversion);`
Is producing the following output:

"The total price is 0.0000" so i'm thinking the error lies within the function?

3. you have a body of the function instead of the call to this funtion

take body of it - out of main, and call it before printing the result

4. And another tip: indent your code (use tabs), like:

Code:
```if(a == b)
{
printf("a is equal to b");
}```
main() returns an int:

Code:
```int main()
{