学年

教科

質問の種類

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

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
TOEIC・英語 大学生・専門学校生・社会人

()のなかで当てはまるものを教えてください。 お願いします。

lounon 01. (Can/May) I ask where (do you come from/you come from)? 02. Today I (shall be working/will work) after school. 03. Do you want to go with usi i would/can) if (could/would/can) but I (couldn't/wouldn't/can't). 04. To the extent he was able, our English composition teacher taught us (construction/ to construct) a group of words with a (completed/completing) thought, a sentence. 05. If I (am/is/are/was/were) asked a question in English, I try to answer in English. 06. He (has eaten/had eaten/ate) breakfast by the time he left the house. 07. What (will/would/can/could) you choose if you (will/would/can/could) choose between Pascal's wager and cryonics? 08. If I (am/is/was/were) a rich man, 1 (could/can) build a five story house. og. If I (was/were) speeding, I slowed down. 10. If I (am/was/were) a king, my wife (would have been/would be) my queen. 11. Would you please tell me what (is your name/your you mind lending me a hand? 13. I (couldn't/can't) see well for the snow was so heavy. 14. (After having/When became/had become) the shift manager. 15. The doctor would not (have given/give) vaccinations (would of/would have/had) (he/she) is)? 12. (Would/Could) name 1) worked part time a few weeks, I (have become/ (know/knew/known) (because/that) they (have/had) never been (proved/proven) to save a single life. 1-03 1-04 (spoken/speaking).

回答募集中 回答数: 0
TOEIC・英語 大学生・専門学校生・社会人

ミドリの蛍光ペンで引いている部分がなぜそうなるのか分からないので教えてほしいです💦

) without an overcoat. (帝塚山学院大) It is warm here in winter. I can ( 0 do 2 hold ③ keep ④ bear し (3) 幸福は財産の多さにはない。(高知大) Happiness does not consist ( 2 at 3 of ④ in ) how many possessions you own. 0 on (3) 4 ) for this error. (中央大) (4) It's very hard to ( 0 make ② look ③ acount ④ take デ大) (4)と3 (5) That coat doesn't ( O go with )your shoes. (南山大) 3 suit for 4 fit at 2 match to 2 (6) The car crash ( 0 carried )in the death of three people. (南山大) caused 3 resulted ④ eliminated (6)_3 (7) Although he was drunk, he insisted ( 2 in ③ to ④ for ) driving. (北海道工業大) 0 on (7) 1 (8) 彼女の推測は正しいことがわかった。(専修大) Her guess turned ( 0 off 2 out ③ at ④ in ) to be right. 2 (路面が)凍結していたために多くの事故が起こった。 (専修大) Many accidents resulted ( 0 in 2 on ) the icy conditions. 3 for の from 1(10) The total fee for the summer course ( many classes you take. (中央大) O leans on ② depends on ③ counts on ④ relies on (10) (11)I certainly agree ( )you on this point. (駒淫大) ① with ② at ③ in ④ for ートフォン 、( を手に入れた。 (12)「すみません, このジャケットが気に入りました。 試着してもいいですか」 「もちろんです」 2 (愛知学院大) )?""Sure." “Excuse me, I like this jacket. May I try it ( 0 on 2 for ③ off ④ in (12) (13) そのスキャンダルの結果, 2人の大臣が辞任した。(中央大) The scandal ( O brought 2 led ③ took ④ made ) to the resignation of two ministers. (13) 2(14)1 ran ( ) one of my old friends on my way back home. (摂南大) 0 through ② out ③ away ④ into (14) _7 4

回答募集中 回答数: 0
1/2