Hi!!!!I have a question...How can I use the data from a file????For example at the following code I want to write a function that finds the max of the numbers i*n,that exist in the file "d.dat".How can I do this????Thank you!!!
#include <stdio.h>
int main()
{
FILE *fp;
int i,n;
fp = fopen("d.dat","w");
if (fp==NULL) {
exit(0);
}
for (i=0; i<=10; i++){
printf("Give number:");
scanf("%d",&n);
fprintf(fp,"%d,%d\n",n,i*n);
}
fclose(fp);
return 0;
}