Untitled
unknown
c_cpp
21 days ago
553 B
2
Indexable
Never
// Online C compiler to run C program online /*Esempio.txt 3 -4 34 6 EOF */ #include <stdio.h> int main() { FILE * file = fopen("Esempio.txt", "r"); if(file != NULL) { int var; int n; while(fscanf(file, "%d", &var) != EOF) { printf("%d", var); n= var; } int valore = 6; int res = valore + var; printf("%d", res); fclose(file); } else { printf("Errore apertura file"); } return 0; }
Leave a Comment