VAT C code help
Go to solution
Solved by C2dan88,
When you first set a with scanf that line should be
scanf("%f", &a);
Your code should be
#include <stdio.h>
int main()
{
float a, sum;
printf("\nEnter Value: $");
scanf("%f", &a);
sum = a * 0.175;
printf("VAT: $%.2f", sum);
sum = a - sum;
printf(" New Value: $%.2f", sum);
}

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now