Help please, I'm just practicing and it's really annoying to have an error. I tried everything but yeah, failed. lol

#include <stdio.h>
main(){
int order;
int price=5;
int bill;
int billd;
int billf;
scanf("Amount of Order: %d",& order);
if (0<=order<=10);
    bill=(order*price);
    billd=(bill*0.1);
    billf=(bill-billd);
    {
    printf("Bill: %d",billf);
    }
else if(11<=order<=20);
    bill=(order*price);
    billd=(bill*0.2);
    billf=(bill-billd);
    {
    printf("Bill: %d",billf);
    }
else if(21<=order<=40);
    bill=(order*price);
    billd=(bill*0.3);
    billf=(bill-billd);
    {
    printf("Bill: %d",billf);
    }
else;
    bill=(order*price);
    billd=(bill*0.5);
    billf=(bill-billd);
    {
    printf("Bill: %d",billf);
    }
}

Allow me to reformat your code in the way the compiler sees it. The problem should be easier to locate that way:

#include <stdio.h>
main(){
    int order;
    int price=5;
    int bill;
    int billd;
    int billf;
    scanf("Amount of Order: %d",& order);
    if (0<=order<=10)
        ;
    bill=(order*price);
    billd=(bill*0.1);
    billf=(bill-billd);
    {
        printf("Bill: %d",billf);
    }
    else if(11<=order<=20)
        ;
    bill=(order*price);
    billd=(bill*0.2);
    billf=(bill-billd);
    {
        printf("Bill: %d",billf);
    }
    else if(21<=order<=40)
        ;
    bill=(order*price);
    billd=(bill*0.3);
    billf=(bill-billd);
    {
        printf("Bill: %d",billf);
    }
    else
        ;
    bill=(order*price);
    billd=(bill*0.5);
    billf=(bill-billd);
    {
        printf("Bill: %d",billf);
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.