/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
int
main ()
{
int nbPhotocop;
float montantTTC = 0;
printf ("Reprographie \n");
printf ("Combien de reprographie voulez-vous ? \n");
scanf ("%d", &nbPhotocop);
if (nbPhotocop <= 10)
{
montantTTC = nbPhotocop * 0.1;
}
if (nbPhotocop >= 11 && nbPhotocop <= 20)
{
montantTTC = ((10 * 0.1) + (nbPhotocop - 10) * 0.09);
}
if (nbPhotocop >= 21)
{
montantTTC = ((10 * 0.1) + (20 * .09) + (nbPhotocop - 30) * 0.08);
}
printf ("montantTTC : %0.2f⏠\n", montantTTC);
return 0;
}