repl.it
C

No description

fork
loading
Files
  • main.c
  • input.txt
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

char **getline(FILE *in){
	for(char ch = fgetc(in);i != EOF && i != '\n';){
		str
	}

	return **str;
}

int main(int argc, char **argv) {
	FILE *in;
	if((in = fopen("input.txt", "r+")) == NULL){
		fprintf(stderr, "err\n"):
		return 1;
	}

	while(){
		getline();
		sum+=atoi(str);
	}

	printf("sum: %d\n", sum);
}
Fetching token
?