Are you saying that your friend is using 10.7 and still cannot run the program?
I would suggest zipping it (right click-> compress) and sending it to your friend that way. Some transmission methods are not necessarily binary safe with any file format, using something like a dmg or zip file is the answer to that.
Make sure your friend puts it on their desktop or something so they for sure have privileges in the unpacked folder.
Now for some unsolicited style advice.
#1. Things like int main() vs int main(int argc, char **argv) and return(0) vs return 0
They may seem archaic and magical but it is a good idea to use them and learn them anyway. (btw, the number and type of arguments is important for linking properly I'm not saying that is your problem just be aware of it. and return is not a function, it is a keyword you wrote return(0), you could have wrote return (((0))) for all the compiler cares. Like foo = 5+(6). Sometimes you see ( ) around a longer expression after return. Almost always with a space after, and ultimately whatever the expression evaluates to is what is returned.)
#2. Whenever you find yourself getting up to variableName# where # is above 2 or 3, you might want to think about are they really necessary. In this case, the variables monday-saturday could just be replaced by a counter like 'totalHours' that you add to at each step of the program.
#3. Some of the repeat typing could be simplified with functions, which I'm going to assume you haven't really gotten around to.
Here is a slight rewrite just to see some of these in work. (also note the [ code ] block)
Code:
#include <stdio.h>
#define kTAXRATE 0.2f
float howManyHours(const char *);
int workedSunday(void);
int main (int argc, const char * argv[]) {
float rateOfPay, pay, tax;
float hours = 0;
printf("\n*** My Wages Calculator ***\n");
printf("What is your hourly pay rate before tax?\n");
scanf("%f", &rateOfPay);
hours += howManyHours("Monday");
hours += howManyHours("Tuesday");
hours += howManyHours("Wednesday");
hours += howManyHours("Thursday");
hours += howManyHours("Friday");
hours += howManyHours("Saturday");
if(workedSunday()) {
hours += howManyHours("Sunday");
}
pay = hours * rateOfPay;
tax = pay * kTAXRATE;
printf("\nThis week you worked:\n%.2f hours!\n\n", hours);
printf("You earned £%.2f before tax\n", pay);
printf("After tax deduction you earned £%.2f\n\n", pay - tax);
return 0;
}
float howManyHours(const char *s) {
float x;
printf("How many hours did you work on %s?\n", s);
scanf("%f", &x);
return x;
}
int workedSunday() {
char ch;
while (1) {
fpurge(stdin);
printf("Do you work on a Sunday? (Y/N)?\n");
ch = getchar();
if (ch == 'Y' || ch == 'y') {
return 1;
} else if (ch == 'N' || ch == 'n') {
return 0;
}
}
}
*note the workedSunday() function doesn't bail if they enter a non Y/N answer. In practice you might want to write a counter into it to let the user out if they keep messing up.