学年

質問の種類

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

vsコードを使ってJava言語の勉強をしてたんですけど初心者すぎて何が原因で上手くコードの実行ができてないのかわかりません… 勉強の資料として使ってるのは京都大学のJavaによるプログラミング入門 です。

17:43 7月27日 (木) 1.7 使用するサンプルプログラム (TankCalculator.java) 1: public class Tank Calculator { 2: public static void main (String args[]){ final double FLOW_RATE = 1.0; final double TANK_AREA = 20.0; final double INITIAL_LEVEL = 10.0; double time; //s double tankLevel; //m ... ocw.kyoto-u.ac.jp 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: time = 30; 14: tankLevel = INITIAL_LEVEL + FLOW_RATE*time/TANK_AREA; 15: System.out.println("Tank Level at time "+ time + "s = " + tankLevel + "m"); 16: 17: 18: 19: } 20:} 11 System.out.println("Flow Rate = + FLOW_RATE + "m** 3/s"); System.out.println("Tank Area=" + TANK_AREA + "m**2"); System.out.println("Initial Level = " + INITIAL_LEVEL + "m"); time = 60; tankLevel = INITIAL_LEVEL + FLOW_RATE*time/TANK_AREA; System.out.println("Tank Level at time "+ time + "s=" + tankLevel + "m"); 【補足】 // の後ろは,プログラムを後で読解しやすくするための注釈です. Flow Rate = 1.0m**3/s Tank Area = 20.0mm**2 Initial Level = 10.0m 8 Tank Level time 30.0s = 11.5m Tank Level at time 60.0s = 13.0m 1.7.1 サンプルプログラムの入力と実行 先ほどと同じように, 秀丸エディタを開き, 20行のプログラムを書き込んで, Tank Calculator.java と名付け, 保存して, コンパイル, 実行してください. 成功すれば,以下の実行結果が示されます。(失敗してもめげないで, 2.5.1 節を参 考に、原因を考え,再トライしてください) ちなみに, 実行結果をファイルに書き出すにはコマンドプロンプトの「リダイレク ト」 という機能を使います 11. java TankCalculator > result.txt これにより result.txt というファイルが出来ているはずです。 中身は数値や文字列 だけのテキストファイルですのでエディタなどで内容を確認できます。 @91% 11javaプログラムの中で明示的にフ ァイルに出力することもできるので すがここでは安直な方法を取ります

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

この問題の解き方がわからないです。誰か教えてくれると嬉しいです。

語句の付加などによる強調表現 do/does/did+動詞の原形 「たしかに/本 当に~する/した 」, the [this/that] very 十名詞 「まさにその~」, on earth, in the world 「いったい」 at all 「まったく」 同じ語の繰り返しによる強調, etc. [ ]内の指示に従って, 下線部を強調する文にしなさい。 1. This is the place I have wanted to visit. [very を用いて] 2. What are you going to do next? [in the world を用いて] 3. I tried to keep my promise, but I couldn't after all. [do の適切な形を用いて] 4. Where has she gone? [on earth を用いて] 5. He is not worried about his future. [in the least を用いて] 6. I'm not interested in such a thing. [at all を用いて] 7. He worked to support his family. [語を繰り返して] ガイド || It is that ... の強調構文は 「~」 の部分を強調する。 It is ~ that [who] ….. の強調構文を用いて, 下線部を強調する文を作りなさい。 D 1. I want to study Japanese history at college. 2. He bought a CD player at this store last Sunday. 3. John Lennon was shot at this spot in 1980. 4. I came to know her while I was in Kobe. 5. I was late because I missed the bus. 強調・倒置 73 ◆日本語をヒントにして ()内の語句を正しく並べかえ, 全文を書きなさい。 6. (it / was / who / you) told him the truth? [ 〜を彼に言ったのはあなたですか] 7. (it / that / was / where) you found the money? 8. It was (that / not / this morning / until) I heard the news. [ 〜を見つけたのはどこですか] [今朝になってはじめて~を聞いた]

解決済み 回答数: 1