谁会编写下面题目要求的C语言程序代码?

[复制链接]
查看11 | 回复2 | 2011-6-23 10:15:36 | 显示全部楼层 |阅读模式
Objective:To reinforce the concepts of reading user input, performing arithmetic computations and decision making, and displaying formatted output.
Recommend Preparation:Review the lectures from weeks 1 and 2, and complete the labs and additional pratice for those two weeks.
Specifications:Write a C program that a small computer company can use to determine the cost of a computer system.The base cost of the system is based on the package selected (basic or professional).Then additional memory and various other upgrades are used to calculate the final cost.
Input:The program should get the following information from the user:
l Type of computer package (basic or professional).
l Additional memory required, in 256 megabyte increments.
l Monitor upgrade required.
l CD/DVD drive upgrade required.
l Note that the input requested will change depending on which upgrades are available for the selected package.
Processing:After getting information from the user, the program will determinant the cost of the system based on the following criteria:
l The base cost will be $799 for the basic package and $1399 for the professional package.
l The base package includes 256 MB of memory and the professional package contains 768 MB.Each additional 256 MB chunks of memory (up to 1024 MB) will add $199 to the cost.
l For the basic package (which includes a 17'' CRT monitor), a 19'' monitor upgrade will add $99 to the cost, and a 19'' LCD monitor upgrade will add $199 to the cost. The professional package includes a 19'' LCD monitor.
l For the basic package (which includes a CD-writer), a combo CD-writer/DVD reader upgrade will add $59 to the cost, and a DVD-writer upgrade will add $159 to the cost.The professional package includes a DVD-writer.
Output:The configuration selected by the user will be displayed, formatted neatly, with the corresponding costs contributed towards the total. Then the taxes and the total cost of the system will be displayed. See the following sample runs for the output format:

回复

使用道具 举报

千问 | 2011-6-23 10:15:36 | 显示全部楼层
你这算是找招人吗,还全英文的...
回复

使用道具 举报

千问 | 2011-6-23 10:15:36 | 显示全部楼层
undershand...
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行