4
But before making this code I created a text file called numero.txt and included it in the file:
23;45;89;-230
452;0;97;1
87;2;4;6
346;97;-5;3
Follow code with error, but I can’t find the error.
#include<stdio.h>
void main(){
FILE *arq;
int num[4];
int i;
arq =fopen("numero.txt", "r");
while(!feof(arq)){
fscanf(arq, "%d;%d;d%;%d",&num[0], &num[1], &num[2], &num[3] );
for(i = 0; i<4; i++){
printf("[%d]=%d\t", i, num[i]);
}
printf("\n");
}
fclose(arq);
}
After that I need to add up the figures. Someone?
Oo Thanks. Thanks a lot.
– Aline