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

–â‘èPDF N‰Èî•ñƒlƒbƒgƒ[ƒN“±“üƒ†ƒjƒbƒg‡UiCŒ¾Œê‡Uj

N/A
N/A
Protected

Academic year: 2018

シェア "–â‘èPDF N‰Èî•ñƒlƒbƒgƒ[ƒN“±“üƒ†ƒjƒbƒg‡UiCŒ¾Œê‡Uj"

Copied!
2
0
0

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

全文

(1)

C言語Ⅱ ~総合演習 文字列, インタ,ファイ ~ 1

C

言語Ⅱ

~総合演習

(1)

文字列,ファイ

以下 問題 関 るプ グラムを作成し,ソースプ グラムを入力後,ビ ,実行し 実行結果を確認し さい. 実行 正しく確認 たら,プ グラムを ポー 用紙 写し,教員あるい TA 確認を受け 提出し さい.

お, ポー 用紙 問題番号,学籍番号,氏名を必 書くこ .

問題

1

乱数(実数)、ファイ 、条件分岐

乱数

(0.0

1.0)

10

個生成し

都度

生成し

値と評価

値 を 右

画 面 表 示

と と

評 価 値

test511.txt

ファイル

出力

プログラムを作成し

さい

生成さ

乱数

0.5

未満

評価値

'L'

以上

'H'

とし

乱数

プログラム

実行さ

値を生成

こと

評価値

格納

char

型変数を使用

と良い

※解答

実行結果とと

test511.txt

内容

記載

こと

test511.txt

記載例:

LHLHLL

実行結果例

乱数値 =0.059389[L] す。 乱数値 =0.663717[H] す。 乱数値 =0.214454[L] す。 乱数値 =0.845820[H] す。 乱数値 =0.477279[L] す。 乱数値 =0.376873[L] す。 乱数値 =0.684408[H] す。 乱数値 =0.078372[L] す。 乱数値 =0.440352[L] す。 乱数値 =0.741874[H] す。

問題

2次元配列(整数)、総和

九九

演算表

(the multiplication table)

を作成し右

結果を表示し

指定し

1

け表示

と共

総和を表示

続いて指定し

1

け表示

とと

総和を表示

プログラムを作成し

さい

九九

演算結果

2

次元配列

格納

こと

実行結果例

1 2 3 4 5 6 7 8 9 2 4 6 8 10 12 14 16 18 3 6 9 12 15 18 21 24 27 4 8 12 16 20 24 28 32 36 5 10 15 20 25 30 35 40 45 6 12 18 24 30 36 42 48 54 7 14 21 28 35 42 49 56 63 8 16 24 32 40 48 56 64 72 9 18 27 36 45 54 63 72 81

何行目を表示しますか? y= 2

2 4 6 8 10 12 14 16 18

合計 90 す。

何列目を表示しますか? x= 3

3 6 9 12 15 18 21 24 27

合計 135 す。

※ 部 キー ート入力 す。

問題

2次元配列(文字列 配列)、ファイ

4

内容

test513.txt

ファイルを作成し

さい

017123

027050

037018

047006

test513.txt

4

学籍番号

1

文字列として読

都度右

学籍番号

該当

学生

氏名をキ

入力

最後

全員

学籍番号と

氏名を表示

プログラムを作成し

さい

学籍番

最大

6

桁使用可能

char

2

次元配列

氏名

スペ

を含

て最大

30

文字

(

半角

)

使用可能

char

2

次元配列と

こと

実行結果例

学籍番号017123 名前:Tanaka Akira 学籍番号027050 名前:Ogawa Kazuo 学籍番号037018 名前:Nomura Miki 学籍番号047006 名前:Hasegawa Kento

全学生 ストを表示します。

学籍番号 名前

017123 Tanaka Akira 027050 Ogawa Kazuo 037018 Nomura Miki 047006 Hasegawa Kento

(2)

C言語Ⅱ ~総合演習 文字列, インタ,ファイ ~ 2

問題

文字列、文字列 長さ

文字列をキ

入力

入力さ

文字列

長さをカウン

を表示

プログラムを作

成し

さい

strlen()

関数

使用し

いこと

実行結果例

文字列を入力し ください。

www.kanagawa-it.ac.jp

文字列 21文字 す。

※ 部 キー ート入力 す。

参照

関連したドキュメント

Theorem 3 implies strong asymptotic stability results: the energy of strong solutions decays to zero, with an explicit decay rate

There is a bijection between left cosets of S n in the affine group and certain types of partitions (see Bjorner and Brenti (1996) and Eriksson and Eriksson (1998)).. In B-B,

Actually a similar property shall be first de- rived for a general class of first order systems including the transport equation and Schr¨odinger equations.. Then we shall consider

Hence, the degree theory constructed in [1] is an extension of the classical Leray–Schauder degree in Hilbert space.. It is unique, single-valued and has the usual properties of

Lair and Shaker [10] proved the existence of large solutions in bounded domains and entire large solutions in R N for g(x,u) = p(x)f (u), allowing p to be zero on large parts of Ω..

We prove a continuous embedding that allows us to obtain a boundary trace imbedding result for anisotropic Musielak-Orlicz spaces, which we then apply to obtain an existence result

This concludes the proof that the Riemann problem (1.6) admits a weak solution satisfying the boundary condition in the relaxed sense (1.6c).... The two manifolds are transverse and

This paper is a sequel to [1] where the existence of homoclinic solutions was proved for a family of singular Hamiltonian systems which were subjected to almost periodic forcing...