I have done everything that has been sugested (and ya i am a terible speller that is why spell check was invented) I am not able to get my dec c ++ to do the extra configurations I am working on it I would sure like to see what you all are seeing and than learn to understand it,
here is the latest problem my screen gose blank as soon as I input the hours per my if else statment (40 or 41+) i have gone through the debuger and it is not telling me anything so if someone could show me the output on the added compil factors for the dev c++ I might find a way to understand or if someone has a sugestion ... I DONT WANT THE ANSWER .. I want help.
Code:#include <stdio.h> int main(void) { char name[30]; int pay = 0; /* selected from case group by alph corispondant # */ int hours = 0; /* user input with if elas statments */ int hlhrs = 0; /* user input in conjunction with the if eals statments */ int ot = 0; /* mathmatical calculation with in the if eals than statments */ int othol = 0; /* mathmatical calculation with in the if eals than statments */ int check = 0; /* total amount of pay for the week */ printf("What is your Name?\n> "); scanf("%s", name); printf("Good Day to you %s."); printf("Please chose one of the following choses so we know the amount of your hourly pay.\n"); printf("1 : $10.00 an hour.\n"); printf("2 : $20.00 an hour.\n"); printf("3 : $30.00 an hour.\n"); printf("4 : $50.00 an hour.\n> "); scanf("%d", &pay); switch (pay) { case 1: pay = 10; break; case 2: pay = 20; break; case 3: pay = 30; break; case 4: pay = 50; break; default: pay = 10; break; } /* Section 2.0 = input of hours worked */ printf("So How many Hours did you work?\n> "); scanf("%d", &hours); if (hours <= 40) { check = pay * hours; delay (30) printf("Your pay this week will be $%d", check); } else if (hours > 40) { printf("How many Holiday and Sunday Hours did you have? IF any!\n> "); scanf("%d", &hlhrs); printf("How many Overtime hours did you work? If any!\n> "); scanf("%d", &ot); } check = ((hlhrs * 2) + (ot * 1.5) + (hours - (hlhrs + ot))); printf("Your pay this week will be $%d", check); return 0; }



LinkBack URL
About LinkBacks


