c - "ld returned 1 exit status" and "incompatible implicit declaration of built-in function 'exit' " -
i bored, started study new, in case, c.
i trying basic script in c i'm having error, , don't know wrong.
//tablas #include <stdio.h> int main() { double i, j, p; int x, y; printf ("tablas del: "); scanf ("%i", &x); printf ("hasta el: "); scanf ("%i", &y); file *f; f = fopen("tablas.txt", "w"); if (f == null) { printf("no se ha podido abrir/crear/reemplazar el archivo\n\a"); exit(1); } printf ("espere mientras se calcula los resulatdos.\n"); system ("del tablas.txt"); (i = x ; <= y ; i++) { (j = x ; j <= 10 ; j++) { fprinf(f, "%f x %f = %f\n", i, j, i*j); } } printf ("\nfin\n\a"); system ("pause"); return 0; }
you need #include <stdlib.h>
exit
work.
Comments
Post a Comment