Re: [情報] 廖婉君班計程homework1

看板NTUEE114HW作者 (Sensation)時間15年前 (2010/10/10 22:38), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《taldehyde (阿肥)》之銘言: : homework 1 : Ch2 Problem 2.19 2.24 2.28 : 2.19 : Write a program that inputs three integers fromthe keyboard and prints the sum, : average, product, smallest and largest of these numbers. : The screen dialog should appear as follows: : | ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| : |Input three different integers: 13 27 14 ∣ : |Sum is 54 | : |Average is 18 | : ∣Product is 4914 | : |Smallest is 13 | : |Largest is 27 | : | | :  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ : 2.24 : Write a program that reads a integer and determines and prints whether : it's odd or even.[Hint: Use the modulus operator.] : 2.28 : Write a program that inputs a five digits integer, separates the integer into : its digits and prints them separated by three spaces each. : [Hint: Use the integer division and modulus operators.] : For example, if the user types in 42339 the program should print: : | ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄| : |4 2 3 3 9 | : | | :  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ 現在改為12題了 期限由10號延長至19號 詳情去CEIBA看吧 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.124.98.42

10/11 23:40, , 1F
可惡,題目越來越看不懂了....
10/11 23:40, 1F
文章代碼(AID): #1CiS_9kV (NTUEE114HW)
文章代碼(AID): #1CiS_9kV (NTUEE114HW)