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();...
Type: Posts; User: Wexy
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();...
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.):...
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...
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...
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:...
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...