You were close, the changes I made are in red and read the comments I added.
int main(int argc, char *argv)
FILE *fin, *fout;
char text, text2, first, last, sale, car;
int number; //no one ever has 4.3798 cars, this only needs to be an integer.
fin = fopen("/home/hp/iacs5/me9x/public/input.dat", "r");
fout = fopen("output.dat", "w");
if ( (fin == NULL) || (fout == NULL))
printf("file open failure\n");
lines = 0;
while( fgets( text, 81, fin ) != NULL )
if ( lines % 2 != 0 )
sscanf(text, "%s%s%s", first, last, sale); //no need for spaces between each %s.
printf("Mr/Ms %s's sale was %s\n", last, sale);
sscanf(text, "%d%s", &number, car); //use %d for integer and don't forget to use an ampersand!
Also, fgets is only ever reading data into text, not text2 as you had here previously
printf("His/Her commision is %d\n", number); //again, %d for integer