佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1255|回复: 4

C++ (请帮忙检查)(更新26/2)(帮忙)

[复制链接]
发表于 22-2-2009 02:08 PM | 显示全部楼层 |阅读模式
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 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 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 | 显示全部楼层
原帖由 lkming 于 22-2-2009 02:20 PM 发表
wrong

the calculation is wrong
not "360" is "3600"   

the algorithm is correct


haha谢谢啦!打少一个l零
回复

使用道具 举报

 楼主| 发表于 25-2-2009 01:45 AM | 显示全部楼层
我顶!
回复

使用道具 举报

发表于 25-2-2009 08:17 PM | 显示全部楼层

回复 4# 风之女神 的帖子

algorithm 没错啊, 没什么还要顶?

还有其他问题吗?

有的话不妨提出来, 酱才能帮你啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 21-12-2025 01:39 AM , Processed in 0.133583 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表