Skip to content

Instantly share code, notes, and snippets.

@ldmsys
Created September 9, 2022 00:25
Show Gist options
  • Save ldmsys/794eb784aff222312049d24d4f37ddcf to your computer and use it in GitHub Desktop.
Save ldmsys/794eb784aff222312049d24d4f37ddcf to your computer and use it in GitHub Desktop.
상용로그표
#include <stdio.h>
#include <math.h>
int main(void) {
int i, j;
double t;
for(i=1;i<10;i++) printf(" %4d ", i);
printf("\n");
for(j=0;j<100;j++) {
printf(".%02d ", j);
for(i=1;i<10;i++) {
t = log10((double)i+(j/100.0f));
printf("%.4lf ", t);
}
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment