#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int main()
{
    float plafond1 = 5614,
          plafond2 = 11198,
          plafond3 = 24872,
          plafond4 = 66679;
	float S, RI, impot;
	
	printf("Entrez votre revenu imposable annuel : ");
    scanf("%f", &S);

    RI = 0.9 * S;

    if (RI <= plafond1)
       impot = 0;
    else if (RI <= plafond2)
       impot = RI*0.0055 - 308.77;
    else if (RI <= plafond3)
       impot = RI*0.14 - 1260.6;
    else if (RI <= plafond4)
       impot = RI*0.3 - 5240.12;
    else
       impot = RI*0.4 - 11908.02;
    printf("Votre impot est : %f\n", impot);
	
	//system("pause");            //decommente si le terminal se ferme
	return 0;
}
