TOPIC

oque esta errado no meu????

João victor asked 10 months ago

include

int main () { double x,a,t,t3,r; scanf("%lf", &x);

if(x>= 0.0 && x<=2000.00)
{
    printf("Isento\n");
}
if(x>= 2000.01 && x<=3000.00)
{
    r = x-2000;
    t = r*0.08;
    printf("R$ %.2lf\n", t);
}
if(x>3000.0 && x<=3002.00)
{
    t = 1000.0*0.08;
    a = 2*0.18;
    t3=a+t;
    printf("R$ %.2lf\n", t3);
}
if(x>= 3002.01 && x<4000.00)
{
    t=1000.0*0.08;
    a=(x-3000.0)*0.18;
    t3=t+a;
    printf("R$ %.2lf\n", t3);
}
if(x>=4000.0 && x<4500.0)
{
    t=2000.0*0.08;
    a=(x-4000.0)*0.18;
    t3=a+t;
    printf("R$ %.2lf\n",t3);
}
if(x> 4500.0)
{
    r=x-4500;
    t = 350+r*0.28;
    printf("R$ %.2lf\n", t);
}

return 0; }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.