Looking for a mentor, of sorts
Firstly, I'd just like to say hey to all that read these boards.
I was wondering if any of you could give up 20 minutes a day (if that) and help me out with my learning. What I mean is if you could set me a task (like they do on the courses at uni) so I could write the code for it, and then you could give me feedback on whether I could make it more efficient etc. The reason for asking is I don't really know of programs that would require most of the things I'm trying to practice, so it would benefit me greatly.
Thanks in advance,
Ben.
Hey men you are good. Lets see if you can do this. Is more challenging
The stuff i gave you to do is from my last semester in Junior college.
But it seem you are pretty good. I think this will be more complicated this is what i have done in class this semester intermediate c programming.
This problems was one of the hardest and it took some time for some of our classmates.
Challenge your self and do this now :D
Mr. C
Code:
We have been meddling with this ADT long enough:
Before displaying the menu; check to see if the save file(named below) exists, and if it does, load in all records in the file.
Create a main() function (and supporting functions) to allow the user to:
1. add data to your list,
2. delete data from your list,
3. display the stored items,
4. save data into a file [list.dat] in the same directory as the executable,
5. load data from the above mentioned file, (note if this is done after edits and deletes it will "forget" all edits that have been done.)
6. and finally quit (when the user wishes to smile )
Compile and link all portions, and get the creature singing...
This was my answer for employee program
Code:
/*This program will calculate the employee pay for the week and overtime*/
#include <stdio.h>
main ()
{
float amnt, overtime;
float a, b;
printf(" ***Calculate your employees pay here for 40 hour normal working week and OT***\n\n");
printf("What is the amount your employees earn for the hour:\n");
scanf ("%f", &amnt);
printf("Enter the amount of overtime hours the employee works:\n");
scanf ("%f", &overtime);
printf("\n\n\n $%2.2f per hour\n", amnt);
printf("\n\n\n%2.0f hours in overtime\n\n", overtime);
a = 40.0 * amnt;
b = (1.5 * overtime * amnt);
printf("Your employee (40 hour) weekly pay is: $%3.2f\n\n", a);
printf("*******************************************************\n\n");
printf("Your employee overtime pay is: $%3.2f\n\n",b);
printf("*******************************************************\n\n");
printf("Your employee total pay incuding overtime is: $%3.2f\n\n", a + b);
return 0;
}
Now try to do the other program i think you can ... hahaha
See ya later
Mr. C