My programm isn't working although it complied o.k
I want to calculate taxes for annual salary.
programm code is as follows:
#include <math.h>
#include <stdio.h>
int main()
{
int salary, foros;
printf("Give the yearly salary for which you want tax to be calculated for. \n" );
printf("The salary must take a value between <0......200000>.\n");
printf("Give annual salary:");
scanf("%ld", &salary);
if (salary > 200000 && salary < 0)
printf("Value is out of range. Give value again\n");
printf("salary:\n");
if (salary <= 19500)
foros = 0;
if (salary > 36300)
foros = int((salary - 36300)*0.3+3775);
printf("Results:\n");
printf("You will have to pay", foros, "euros for tax\n");
scanf("%ld", & salary);
printf("Your tax free salary is", salary-foros,foros, "euros per year\n");
/*printf("\n This corresponds to", salary-foros/12 "euros per month\n");*/