|
查看: 1255|回复: 4
|
C++ (请帮忙检查)(更新26/2)(帮忙)
[复制链接]
|
|
|
1.Design a program to determine the time and the day in seconds.
The hours, minutes and seconds entered by the user.
Convert the hours and minutes to seconds and get the
total of seconds of the day. Print the hours, minutes and
seconds and the total of seconds. (50 marks)
Algorithm
Begin
Input Hour
Input Minutes
Input Seconds
Sec_hours=Hours*3600
Sec_minutes=Minutes*60
Total Of Second=Seconds+Sec_hours+Sec_minutes
Print Hours
Print Seconds
Print Minutes
Print Total Of Second
End
2.Design a program to allow the user to enter Customer name,
Customer Account Number and old balance.
New balance calculated at an interest of 10%.
Display Customer name and new balance
Algorithm
Begin
Input Cust_Name
Input Cust_Acc_Num
Input Old_bal
New_Bal=Old_bal*110/100
Print Cust_name
Print New_bal
End
我这样写是对的吗?
[ 本帖最后由 风之女神 于 25-2-2009 01:45 AM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
发表于 22-2-2009 02:20 PM
|
显示全部楼层
wrong
the calculation is wrong
not "360" is "3600"
the algorithm is correct  |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 22-2-2009 02:51 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 25-2-2009 01:45 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 25-2-2009 08:17 PM
|
显示全部楼层
回复 4# 风之女神 的帖子
algorithm 没错啊, 没什么还要顶?
还有其他问题吗?
有的话不妨提出来, 酱才能帮你啊 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|