Created
March 20, 2017 16:55
-
-
Save AndyNovo/a0d107a98a429cf99f98a8a3663ccbbb to your computer and use it in GitHub Desktop.
Using a function this time
This file contains hidden or 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 compare(int a, int b){ | |
return a == b; | |
} | |
int main() { | |
int i=0; | |
for(; !compare(i, 5); i++){ | |
printf("i = %d\n", i); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment