c

time

c

#include <stdio.h> #include <time.h> int main(void) { time_t t = time(NULL); printf("ctime(time()): %s \n", ctime(&t)); return 0; }</time.h></stdio.h>

基礎からのC、P216

c

1カ所おかしな部分があった。for文の末尾に不要な;が書かれていて動かなかった。 #include <stdio.h> int main(void) { int arr[10] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, }; int loop; for (loop = 9; 0 < loop; --loop) { arr[loop] = arr[loop - 1]; } arr[loop</stdio.h>…

配列内の値で、降順・昇順を入れ替えて表示するプログラム

c

#include <stdio.h> int main(void) { int arr_1[10] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, }; int arr_2[10]; int count = 0; int loop = 0; while (count < 10) { arr_2[9 - count] = arr_1[count]; ++count; } //以下、確認用の表示 while (loop < 10) { printf</stdio.h>…

C言語入門

http://edu.inf.shizuoka.ac.jp/lecture/2010/iaprog/intro/ ざわざわ・・・

"¥100"

c

#include <stdio.h> int main(void) { printf("\"\\%d\" \n", 100); return 0; }</stdio.h>

Hello, C!

c

#include <stdio.h> int main(void) { printf("Hello, C!"); return 0; }</stdio.h>

C言語

基礎からのC (プログラマの種シリーズ)作者: 山田和夫出版社/メーカー: SBクリエイティブ発売日: 2008/10/31メディア: 単行本 クリック: 5回この商品を含むブログ (4件) を見るC言語を学びます。 #追記 以前書いた記事を下書き状態の記事と勘違いして消して…