红联Linux门户
Linux帮助

语编程问题,高手帮帮忙(英语高手哦)

发布时间:2010-03-15 18:37:10来源:红联作者:dragonballz52
[i=s] 本帖最后由 dragonballz52 于 2010-3-15 18:39 编辑 [/i]

问题1:
A phone company offers several plans for its mobile phones. Each plan has a monthly fee and a monthly “value”. The monthly fee must be paid irrespective of how many calls and messages are sent. If the cost of the calls and messages is greater than the value, the extra is added to the monthly fee. The plan costs are

Plan Fee Value
A $59 $230
B $69 $280
C $89 $560
The costs of calls and messages are the same for all plans.

Service Cost
call 30¢ + 35¢ per 30 sec
messages 25¢ per message

Write a C program which will compute the cost of the cheapest plan given the number of calls, the total time on calls and the number of messages. You do not need to indicate which plan was the cheapest.
Your program will read the number of calls, the total time on calls (in seconds) and the number of messages from a single line. The output will be a single number - the cheapest cost, in cents.

Input Output
80 14400 0 5900
80 14400 360 7100
160 28800 720 9300
Limits: All numbers will be integers and >= 0.

这道题我纠结了半天,,超级难啊,,哪个编程高手帮帮忙解出来啊。。。也是为自己增加实战经验哦,3Q
文章评论

共有 0 条评论