Here is my code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int hours; //hours worked.
double rate; //Hourly rate
double regular; //Regular pay
double overtime; //how many hours the user worked overtime.
double gross; //Gross salary
double federal; //Federal tax of 27%
double medical; //medical insurance, 14%
double net; // Pay after federal tax and medical insurance is taken out.
char c[1];
int Running = 1;
int f = -1;
void option(int opt);
main(void) {
void workStats(void); //Function that will collect user's number of hours and how much they make an hour.
void regularPay(void);
void grossPayWithOvertime(void);
void totalPayTakingOutTaxes(void);
void printMenu(void);
void printMenu(void);
while (Running == 1) {
scanf("%d", &f);
option(f);
printf("\n");
}
return 0;
}
void option(int option) {
switch (option) {
case 1:
workStats();
break;
case 2:
regularPay();
break;
case 3:
grossPayWithOvertime();
break;
case 4:
totalPayTakingOutTaxes();
break;
case 5:
Running = 0;
break;
default:
printf("Sorry, but that was not an option; Please enter one of our choices. Type any number between 1 and 6.");
system("pause");
}
void printMenu(void); {
printf("==========================================================\n");
printf("===========Payroll Program==========================\n");
printf("============================================================\n\n");
printf("Things you can do here.\n");
printf("\n1. Tell us about how much you make and how many hours you work \n");
printf("\n2. Regular Pay, before taxes are included\n");
printf("\n3. Gross PAy (This includes overtime) \n");
printf("\n4. Net pay (Taxes taken out of Gross Pay) \n");
printf("\n5. Exit");
printf("Please type the number corresponding to the action you wish to take. \n");
}
void workStats(void); {
printf("Now, how many hours do you work a week?");
scanf("%d", &hours);
printf("Please tell me how much you make per hour.");
scanf("%lf", &rate);
}
void regularPay(void); {
regular = rate * hours;
printf("Regular Pay:%.2lf \n ", regular);
}
void grossPayWithOvertime(void); {
overtime = (hours - 40) * (rate * 1.5);
printf("Overtime Pay:%.2lf \n ", overtime);
gross = regular + overtime;
printf("Gross Pay:%.2lf \n ", gross);
}
void totalPayTakingOutTaxes(void); {
federal = gross * .27;
printf("Federal Tax:%.2lf \n", federal);
medical = gross * .14;
printf("Medical Insurance :%.2lf \n ", medical);
net = gross - (federal + medical);
printf("Net Pay:%.2lf \n ", net);
system("pause");
}
}
The issue is when I try to compile it does not recognize my function calls. A cleaning and rebuilding did not solve this issue, (I just programmed this today, so it was not sitting around or anything) and I don't have any outside files that I reference in this code so that is not the issue either. Any help is much appreciated. Full Error: https://puu.sh/wKn4n/00f95f3032.png