2011-09-26から1日間の記事一覧

Collatz問題 #11

操作後の値が100以下になる操作を全て挙げてDOT言語で表したグラフを出力してみる。 collatz7.c #include <stdio.h> int main(void) { unsigned long x; puts("digraph {\n edge [color=blue];"); for (x = 1; x <= 100; x++) { if (x % 6 == 4) printf(" %lu -> %lu </stdio.h>…