please help me C language

kasuwa1235

Well-known member
  • Dec 17, 2007
    6,353
    91
    48
    gampaha
    this is Question

    Electricity board needs to develop software to calculate the customer Monthly electricity Bill You are Required A develop a software

    The Inputs to the programme are units consumed and unit price

    then monthly bill should be calculated as

    bill amount=unit price*unitconsumed

    if units consumed is greater than 100 apply 2% tax from to the bill amount. (tax amount=billamount*2%)

    Total bill amount =bill amount+tax amount

    Write down the C language Programmes ?

    unit price = 2 usd




    mata me kohoma hari oni ada

    C# coding ekath oni
     

    kitisit

    Well-known member
  • Mar 1, 2007
    2,087
    141
    63
    C# nam dane natho C nam,

    void main()
    {
    int units;
    float unipri,bill;

    clrscr();

    printf("Enter the Unit Price:");
    scanf("%f",&unipri);
    printf("Enter the number of Units:");
    scanf("%d",&units);

    if(units>=100) bill=(unipri*units)*100.2;
    else bill=(unipri*units);

    printf("Bill is %f",bill);

    getch();
    }