• 検索結果がありません。

b b b a d ナ ニ ヌ ネ ノ a b d d a タ チ ツ テ ト a b a d a サ シ ス セ ソ a a d d c カ キ ク ケ コ d d b a d ア イ ウ エ オ

N/A
N/A
Protected

Academic year: 2021

シェア "b b b a d ナ ニ ヌ ネ ノ a b d d a タ チ ツ テ ト a b a d a サ シ ス セ ソ a a d d c カ キ ク ケ コ d d b a d ア イ ウ エ オ"

Copied!
3
0
0

読み込み中.... (全文を見る)

全文

(1)

1

前期末試験解答用紙 情報工学概論

(2005

年度

2E)

2005.9.26

学籍番号 氏名

1.

基本

C

言語プログラム

(

3

点 計

75

)

ア イ ウ エ オ

d d b a d

カ キ ク ケ コ

a a d d c

サ シ ス セ ソ

a b a d a

タ チ ツ テ ト

a b d d a

ナ ニ ヌ ネ ノ

b b b a d

2.

文法

(

10

)

[1](3)

これはプリプロセッサーの文字列置換という機能 を実現する。コンパイルに先立って、ソースプログラ ム中のTESTという文字列を100000に置き換える。

[2](3)

動作は、以下の通りである。

① ファイルポインターfp で指定されたファイルを 読み込む。

② もしファイルの終わり(EOF が示す)であれば、

whileのループから抜ける。

③ ファイルの終わりではなく、データを読み込んだ ならば、それを表示する。

④ 再び①へ戻る。

[3](4) 答え 整数の14

200を計算して、キャストにより整数化して、整 数型変数iに代入している。

(2)

2

3.

プログラム

(15

)

[1](10)

#include <stdio.h>

int main(){

int i, sum;

sum=0;

for(i=1; i<=1000; i++){

sum += i;

}

printf("sum = %d¥n",sum);

return 0;

}

(3)

3 [2](5)

#include <stdio.h>

#include <math.h>

int main(){

double x, width, s;

int n,i;

for(n=2; n<=100000; n++){

s=0;

width=1.0/n;

for(i=1; i<=n; i++){

x=(double)i/n;

s+=sqrt(1.0-x*x)*width;

}

printf("%d¥t%15.10f¥n", n, 4.0*s);

}

return 0;

}

参照

関連したドキュメント

また適切な音量で音が聞 こえる音響設備を常設設 備として備えている なお、常設設備の効果が適 切に得られない場合、クラ

* 施工手順 カッター目地 10mm

(The Elliott-Halberstam conjecture does allow one to take B = 2 in (1.39), and therefore leads to small improve- ments in Huxley’s results, which for r ≥ 2 are weaker than the result

This paper gives a decomposition of the characteristic polynomial of the adjacency matrix of the tree T (d, k, r) , obtained by attaching copies of B(d, k) to the vertices of

Many of the classical random decomposable combinatorial structures, such as random permutations and random polynomials over a finite field, have component structure satisfying

There is a good notion of contract- ing functor (X, A, d) → (Y, B, d) between two approximate categorical structures, see Definition 5.3, so we can look at contracting functors from

When the geometric method is applied to the inter- section lattice of any Coxeter arrangement, the cycles in the resulting basis are Boolean and are indexed by the elements of

Visual Studio 2008、または Visual Studio 2010 で開発した要素モデルを Visual Studio