Skip to content

Instantly share code, notes, and snippets.

@alexesDev
Created December 26, 2012 22:25
Show Gist options
  • Select an option

  • Save alexesDev/4383586 to your computer and use it in GitHub Desktop.

Select an option

Save alexesDev/4383586 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void main(void)
{
FILE* file = fopen("table.txt", "w");
int i;
fprintf(file, "+-----+-----+\n");
fprintf(file, "+- 1 -+- 2 -+\n");
fprintf(file, "+-----+-----+\n");
for(i = 0; i < 10; ++i)
{
fprintf(file, "+ %3d + %3d +\n", i, i * 10);
fprintf(file, "+-----+-----+\n");
}
fclose(file);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment