online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) //na wstepie dziekuje dla Delora za pomoc :) { int p,d,wb; FILE* plik1; FILE* plik2; if ((plik1 = fopen(argv[1], "r")) && (plik2 = fopen(argv[2], "r"))) { char a[8]; char b[8]; while (feof(plik1)==0 || fgetc(plik2)==0) { if(feof(plik1)!=0) p=0; else { fgets(a,8,plik1); p=atoi(a); } if(feof(plik2)!=0) d=0; else { fgets(b,8,plik2); d=atoi(b); } printf("dwie liczby z rownoleglych sobie linii obu plikow\n"); printf("a: %d \nb: %d\n",p,d); wb=p-d; if(wb<0) wb=-wb; printf("wartosc bezwgledna roznicy obu liczb (a-b): %d \n",wb); printf("=================================================\n"); }; fclose(plik1); fclose(plik2); } return 0; }
99 14 -5 107 5 1 2 -66 199 33
1 2 3 -4 5

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue