Untitled
unknown
c_cpp
a year ago
553 B
11
Indexable
// 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;
}Editor is loading...
Leave a Comment