Created
July 17, 2013 07:14
-
-
Save mkamotsu/6018331 to your computer and use it in GitHub Desktop.
満場一致でBのほうが書きやすい/読みやすいと言われたけどマジなの……
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> | |
void A(void) { | |
int i; | |
for (i=0; i<100; ++i) { | |
printf("%d %g %g\n", i, (i / 10 + 1) * 0.1, (i % 10 + 1) * 0.1); | |
} | |
} | |
void B(void) { | |
int i = 0; | |
double alpha; | |
double beta; | |
for (alpha=0.1; alpha<1.0; alpha+=0.1) { | |
for (beta=0.1; beta<1.0; beta+=0.1) { | |
printf("%d %g %g\n", i, alpha, beta); | |
++i; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment