Search:

Type: Posts; User: Wexy

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,765

    This is what i have so far..everything works,...

    This is what i have so far..everything works, except function calculatebill()..so it returns the wrong answer:



    #include <stdio.h>
    #include <stdlib.h>

    int GetRates();
    int CalculateBill();...
  2. Replies
    4
    Views
    3,765

    algorithm for rate based billing?

    I need to write a program which calculates an electric bill based on several tiers..
    ex:
    Fixed Rate (upto 100 KWh.): $100.00
    Rate/KWh (100 upto 200 KWh.): $1.20
    Rate/KWh (200 upto 300 KWh.):...
  3. Replies
    3
    Views
    1,210

    help with simple debugging

    The code compiles fine, but when it is run, the menu will come up twice and it will say invalid keypressed even when nothing is pressed. When it does the computations it always gives the incorrect...
  4. Thread: Please help debug

    by Wexy
    Replies
    2
    Views
    3,406

    Please help debug

    as of now it wont compile..when it did compile it wouldnt work after the user chose 1 or 2 (float or decimal)..any help would be appreciated!


    #include <stdio.h>

    int main()
    {
    int...
  5. Replies
    3
    Views
    3,052

    errors: irix2[9]% gcc -ansi -Wall proj4.c...

    errors:
    irix2[9]% gcc -ansi -Wall proj4.c
    proj4.c: In function `main':
    proj4.c:34: parse error before `switch'
    proj4.c:72: parse error before `{'
    proj4.c:85: duplicate case value
    proj4.c:45:...
  6. Replies
    3
    Views
    3,052

    help with switch statements

    Hello, I'm trying to do a project which will add/subtract/multiply/divide two integers, the user chooses whether its float or integer and then inputs the two integers. Can anybody help debug my code...
Results 1 to 6 of 6