Created
November 22, 2018 02:09
-
-
Save tomcha/205e96a9ee48fb37b425ee2e2a458061 to your computer and use it in GitHub Desktop.
C言語での小数計算
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
float f = 0.0; | |
int j = 0; | |
for (int i = 0; i < 100; i++){ | |
f += 0.01; | |
j += 1; | |
} | |
printf("%f\n", f); | |
printf("%d\n", j); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment