Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

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