Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Last active January 28, 2016 14:49
Show Gist options
  • Save pinglunliao/df700e018901fadd9595 to your computer and use it in GitHub Desktop.
Save pinglunliao/df700e018901fadd9595 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int power(int x); // 這叫函式原型,是用來騙編譯器的
int main(void) {
int result = power(3);
printf("printf本身就是函數囉!\n");
printf("3^2 = %d", result);
return 0;
}
int power(int x) {
int y = x * x;
return y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment