2007-11-19から1日間の記事一覧

禁煙継続中(8/19~)

もう4ヶ月もまったくすってない。 流石にもう吸いたい気もしないなぁ。

1-5

for文を使ってみる [5638]% gcc 1-5.c -o 1-5 -Wall 1-5.c:6: warning: return type defaults to `int' 1-5.c: In function `main': 1-5.c:17: warning: control reaches end of non-void function [5639]% cat 1-5.c | c2utf #include <stdio.h> /* * fahr=300,280・</stdio.h>…

1-4

ちょっとした復習。 [ERROR:15]% cat 1-4.c |c2utf && ./1-4 #include <stdio.h> /* * celsius=0,20,・・・300に対して、摂氏-華氏温度対応表を作成 **/ main(){ float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; celsius = lower; </stdio.h>…

1-3

printfの使い方。man printf。 [5623]% cat 1-3.c |c2utf #include <stdio.h> /* * fahr=0,20,・・・300に対して、華氏-摂氏温度対応表を作成 **/ main(){ float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; printf("%</stdio.h>…

コンパイルして実行をvimから1キーで実行

$HOME/.vimrcに以下の行を追加 map <F5> :w<CR>:!gcc % \| ./a.outF5キーを押すと実行してくれます。なんかデフォルトでうまくやる方法がある気がするんだけど、 とりあえずいいこの設定で快適なのでOKです。</cr></f5>