right i see, i was looking for a x1 and x2 value, but one you just calculate inside the difftime which is much simpler!
Although I seem to understand it, i cant seem to get it to work! Apparantly it takes me 0 seconds when testing it.
Below is my reduced code, at the moment only asking 2 questions as it became quite tedious to test it 20 times!
Code:
time_t_t1 = time(NULL);
for(i=0;i<2;i++){
/** for loop each time asking new question**/
}
perc = (200 / j);
printf("Congratulations! You have answered 2 answers correctly out of %d.\n", j);
printf("Your results are,\nPercentage: %d%%\n", perc);
printf("%d\n", difftime(time_t_t1, time(NULL)));
Any idea what i have missed?
Thanks