Time to experiment again. This post was created with the latest version of Windows Live Writer.
Here is an attempt at embedding code
#include <stdio.h>
/* the n-th fibonacci number.
*/
unsigned int fib(unsigned int n) {
unsigned int a = 1, b = 1;
unsigned int tmp;
while (--n >= 0) {
tmp = a;
a += b;
b = tmp;
}
return a;
}
main() {
printf("%u", fib(10));
}
Since I had some problems entering code with the wysiwg editing capabilities of Wordpress I want to see if Live Writer does this better.
Tags: 1 Comment
1 response so far ↓
You need color syntax highlighting.