All pastes #387177 Raw Edit

Programilla Arch

public c v1 · immutable
·published 2007-03-09 04:01 UTC
rendered paste body
#include <stdio.h>#include <math.h>main(int argc, char** argv) { FILE *f; int c1=0,c2=0,f1=0; char c; if((f=fopen(argv[1],"r")) != NULL) {  while((c=fgetc(f))!='\n') c1++;   fseek(f,c1-1,SEEK_SET);  while((c=fgetc(f))!=' ') {   fseek(f,c1-1,SEEK_SET); c1--;   f1+=atoi(&c) * pow(10,c2); c2++;  } } printf("%d",f1);}