学年

質問の種類

情報 大学生・専門学校生・社会人

c言語プログラム 本当に分かりません。 どなたか教えてください

(2点) 【演習3】 if-else と繰り返し文 最大値(整数)と整数xをキー入力すると、1から最大値までの整数を順に表示するプログラムを if-else 文および for文を使って作成せよ。 ただし、最大値が10~50以外の場合、または整数 x が 2~9以外で 入力された場合は、「範囲エラー」 を表示すること。 また、1から最大値までの整数を表示する際、表示 する整数が整数xで割り切れる場合は を、 割り切れない場合はその整数を表示すること。 xで割り切れる値は☆を表示 <ソースプログラム> #include <stdio.h> int main (void){ イント2 ント5 } printf("最大値: "); /* 変数宣言*/ return 0; printf(" 整数x: "); cats ; /*キー入力*/ // *キー入力*/ <実行例①> |最大値: 10 ↓ 整数x2↓ 13579☆ <実行例②> |最大値: 50 ↓ 整数x 91 12345678 10 11 12 13 14 15 16 17 19 | 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 ★ 37 38 39 40 41 42 43 44 46 47 48 49 50 <実行例③> 最大値: 9 整数x2↓ 範囲エラー <実行例⑤ > 最大値: 10 ↓ 整数X : 1↓ 範囲エラー <実行例④ > | 最大値: 51 ↓ 整数X ↓ 範囲エラー <実行例⑥ > 最大値: 50 ↓ 整数x : 10↓ 範囲エラー (下線部はキー入力を、↓は Enter を示す)

未解決 回答数: 1
英語 高校生

解説読んでも全然ピンとこないです。解説お願いします。全文お願いします。

英文分析 1. [only + 副詞 (句・節)〕 + 疑問文の形式の倒置形 文の形の倒置形でしたね。 本文も, not only で始まっていますから、 後ろが does it only は否定的な意味を持つ副詞で, 〔only + 副詞 (句・節)〕で始まれば後ろが疑問 provide という疑問文の形式の倒置になっています。 また、本文では [not only A but B) の熟語が使われていますが, but Bがずいぶん と後ろにありますから見落とさないようにしてください。 2. 仮定法らしき文の中に疑問文の形がでてきたらifの省略の合図 本文では S provide no substitutes までがSVOの一つの完全な文なのに、突然 should が出てきます。 そこでifの省略を予測できたかどうかがポイントです。(if S should V〕の倒置は他の倒置より難しい場合があります。というのは普通の仮定法と は違い主節には次のように様々な形を取りうるからです。 If S+should+V, + 直説法 : S will V / Scan V / S may V / SV * 「直説法」・・・あることを事実として述べるときの動詞の形。 +仮定法 : Swould / could/might V + 命令文 : V 本文では, if a mother or father should be unable to care for his or her child の if が省略されて倒置になっています。 また,主節に直説法の文が置かれていて, おまけに 助動詞が入っていませんから、難しく感じたかもしれません。 3. could/would / might は,形は過去形でも意味は現在 本文最後の箇所に突然 could が登場します。 これは 「can の弱め」として使われてい ます。 if節のない仮定法と考えてもOKです。 つまり「よい環境に無かったので結束 していなかったが、もしよりよい環境ならば、おそらく結束していただろう」という意 味です。 つまり in better circumstances が if節の代わりになっていると考えればいい わけです。 このようにif節のない仮定法はよく出てきますが、ほとんどの場合,主語 か副詞 (句)がif節の代わりになっていますので覚えておいてください。

回答募集中 回答数: 0
英語 中学生

3枚目の写真のような問題って どうやって解くんですか? 私はいつも段落の最初と最後を見てるんですが 一問間違えてしまいました。ぼぼ勘だったりもするので教えて欲しいです🙇‍♀️

いる。 各問いに答えよ。なお, [1] Have you ever seen the 2D codes which have a special mark on the corners? For example, you can find the 2D codes in your textbooks. When you scan them with a tablet computer, you can see pictures or watch videos. Today, a A lot of people around the world use them in many different ways. This type of (2 2D code was invented by engineers at a car parts maker in Japan. [2] When cars are produced, many kinds of parts are needed. Car parts makers have to manage all of the car parts. About 30 years ago, car companies needed to produce more kinds of cars, and car parts makers had to manage many different kinds of car parts for each car. At that time, they used barcodes to manage the car parts, but they could not put a lot of information in one barcode. So, they used many barcodes. Workers had to scan many barcodes. A worker at a car parts maker had to scan barcodes about 1,000 times a day. It took a lot of time to scan them. The 0 000742 221101 barcode (バーコード) workers needed some help to improve their situation. [3] The engineers at a car parts maker in Japan knew the situation of the workers. They started to learn about 2D codes because 2D codes can contain more information than barcodes. There were already some types of 2D codes in the U.S. One type could contain a lot of information, but it took a lot of time to scan that type. Another type was scanned very quickly, but it contained less information than other types. The engineers at the car parts maker did not use these types. They decided to create a new type of 2D code which had both of those good points. The engineers needed a long time to create this new type which could be scanned quickly. Finally, they thought of an idea. They thought, "If a 2D code has a special mark on the three corners, it can be scanned very quickly from every angle." In this way, the new type of 2D code with special marks was invented by the engineers at a car parts maker in Japan. 2D code

未解決 回答数: 1