Does anybody know how to make a program that calculates your work hours? I tried this code, but it's going all wrong. #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<ctype.h> #include<string.h> #include<time.h> char* timein[5], timeout[5], p; int totaltime, ticktock, hour, minute, rate; FILE* f; int main(){ clrscr(); CreateTimeFile(); GetTimes(); DisplayFinalInfo(); getch(); } CreateTimeFile(){ f = fopen("time.txt","w"); fclose(f); } GetTimes(){ f = fopen("time.txt","a"); printf("\nEnter time in 24-hour format. \nWARNING: An error at any point in the input will result in needing to repeat the process.\nEnter time-in for Monday: "); scanf("%c",&timein); ValidateTimeIn(); printf("\nEnter time-out for Monday: "); scanf("%c",&timeout); ValidateTimeOut(); AppendTimes(); printf("\nEnter time-in for Tuesday: "); scanf("%c",&timein); …

Member Avatar
Member Avatar
+0 forum 9

Hi all! I am in the beginning to mid stages of my project. It's an autobody program. You get the calculations when you click Calculate. However, I can't seem to get the hours of labor box to compute to the correct amount. Whenever I put something more than 1 hour, say 2, you get the same answer as just 1 hour. eg: Parts = $10, Hours of Labor= 2 then when you calculate it, you get just $50. am I making sense? Here is my code so far: [CODE] 'Program Name: JobInformation 'Programmer: xero 'Date: 11/28/2011 'Description: This program produces …

Member Avatar
Member Avatar
+0 forum 3

I've been given a basic form of programming to do. And I simply cannot figure it out. I know this topic has been covered several times before. But each of them going around the one crucial step that I need to complete my programming. My instructor insists that the 24 hour clock is given in HH:MM time and not as two separate factors. If you want me to post the bits of coding I have in here I can, but it's not much and probably will not contribute much. I'm thankful for any bits of help I can get. If …

Member Avatar
Member Avatar
+0 forum 12

I would like to be able to create a script that displays whether or not a store is open when the user looks at the page. It would be simple if some didn't close for an hour during the day. I could set it up: MondayOpen 800 MondayClosed 1600 and have the script determine if the current time is in between those two times. However, like I said, some stores are closed for a little time during the day. I'm at a loss how I should set up my tables and script. Any help would be greatly appreciated.

Member Avatar
Member Avatar
+0 forum 22

The End.