Study topic for this question
ဤမေးခွန်းအတွက် လေ့လာရန် ခေါင်းစဉ်
More questions on the same topic
တူညီသောခေါင်းစဉ်မှ မေးခွန်းများ
What is the output when procedure calcMod3 is called? [Program] ○calcMod3() Integer: totalValue, i totalValue ← 0 for (i from 1 to 7, increment by 1) if (remainder of i ÷ 3 equals 0) totalValue ← totalValue + i endif endfor output totalValue
calcMod3 procedure ကို ခေါ်သောအခါ ထုတ်ပေးသော output မှာ အဘယ်နည်း? [Program] ○calcMod3() Integer: totalValue, i totalValue ← 0 for (i ကို 1 မှ 7 သို့ 1 စီ တိုးသည်) if (i ÷ 3 ၏ အကြွင်းသည် 0 နှင့် ညီ) totalValue ← totalValue + i endif endfor totalValue ကို ထုတ်ပြပါ
Function calculateAmountOfPrize receives improvement amount and time reduction as 'improvement' and 'period', returning the prize amount. There were two improvements: 200,000 yen/3 days and 50,000 yen/14 days. What is the total prize amount? [Program] ○Integer: calculateAmountOfPrize(Integer: improvement, Integer: period) Integer: prize if (improvement < 100000) if (period < 7) prize ← 500 else prize ← 1000 endif else if (period < 7) prize ← 2000 else prize ← 5000 endif endif return prize
calculateAmountOfPrize function သည် လုပ်ငန်း တိုးတက်မှုပမာဏ (improvement) နှင့် အချိန်တိုတောင်းမှုကာလ (period) ကို လက်ခံကာ ဆုကြေးငွေ ပြန်ပေးသည်။ တိုးတက်မှု ၂ ဦးရှိသည်: ကျပ် ၂၀၀,၀၀၀ / ၃ ရက် နှင့် ကျပ် ၅၀,၀၀၀ / ၁၄ ရက်။ ဆုကြေးငွေ ပေါင်းစုစုမျှ မည်မျှနည်း? [Program] ○Integer: calculateAmountOfPrize(Integer: improvement, Integer: period) Integer: prize if (improvement < 100000) if (period < 7) prize ← 500 else prize ← 1000 endif else if (period < 7) prize ← 2000 else prize ← 5000 endif endif return prize