Loading...

Във форума е въведено ограничение, което позволява на потребителите единствено да разглеждат публикуваните въпроси.

AlexxG avatar AlexxG -16 Точки

Трябва ми помощ за задача която може да ме освободи от изпит в университета.

Така това е задачата която моят доцент по "базово програмиране ни е дала за освобождаване от изпит. Но понеже още не съм навлязал в програмирането ми е нужна помощ за направата и, затова ще ви бъда благодарен за всяко едно мнение по темата отностно решаването и. Дала е описанието на задачата на английски език, незнам защо но така е решила. И понеже нямам познат който да е толкова запознат с тази специалност се обръщам към вас за помощ. Нужно ми е да се представя добре зимния семестър защото имам голямо желание лятото да замина на бригада в САЩ, а ако сега покажа характер лятото ще се съгласят да изтегля изпитите си по рано.. И така ето условието на задачата:
 

Първа задача английски текст

This exercise should familiarise you with functions and parameters. You will have to design 

and implement a program that helps a printer in making quotes for their products. There 

are many ways to write this program, but it is essential that you use functions and that you 

do not use any global variables (you will not even need local variables)

PART 1 (worth 50%): A printer has the following pricing system for books. For black and 

white printing, each sheet of paper costs a penny. In addition, they have to make a plate 

for each page of the original, costing 7 pounds. For colour printing, each sheet of paper 

costs 4 pennies, and the plates are 28 pounds. Binding costs 2 pound per copy of the

book. These prices exclude 17.5% VAT (VAT has not yet risen on this bookbinder's planet). 

The printing is double sided.

As an example, printing 400 black and white books with 100 pages each costs:

100*7 pounds £ 700.00 for the plates. 

(100/2)*400*1 

pennies   £ 200.00 for the paper.   (2 pages per 

400*2 pounds £ 800.00 for the binding. 

Subtotal £ 1700.0

VAT £ 297.50 17.5% over 1700 pounds 

Grand Total £ 1997.5

sheet) 

1. Write a function that calculates the price of a job given the number of pages, price 

per sheet, price per plate, and number of copies.

2. Write a function that calculates the price of a job given the number of pages and the 

number of copies for black and white printing. This function should call the function 

that you wrote for part 1.

3. Write a function that calculates the price of a job given the number of pages and the 

number of copies for colour printing. This function should call the function that you 

4. Write a main program that calculates the total price of printing 1000 colour books 

with 32 pages, 2000 black/white books with 40 pages and 400 black/white books 

with 160 pages. The main function should call the functions that you wrote for parts 

1. Change the function that calculates the price of a job so that it assumes that books 

are printed with 16-fold signatures. (ie, the number of sheets is rounded up to the 

nearest multiple of 16).

Change the main function so that it prints in addition to the previous number:

• The price of printing 50 colour books of 30 pages each with 16-fold 

signatures.

• The price of printing 35 black and white books of 34 pages each with 16-fold 

signatures.

Please note: You don't need to change the parameters of your functions for this part. Each 

printed page (including partially printed pages) will need a plate, but blank pages won't. 

You may print out the first answer using a 16 fold signature as well for this part. Three 

numbers should therefore be printed for this extension.

You may wish to find out how to obtain remainders in C using the modulus operator %, for 

example a % b in C will give the integer remainder when a is divided by b. You may also 

want to look at 'typecasting' - forcing conversion from one type into another type - because 

it is a common technique used for rounding in C. For example, typecasting a non-whole 

number as an integer will round it down to the nearest integer, e.g. (int) 3.14159 will 

2. Change the functions so that the number of pages in a signature is passed as a 

parameter. (ie, the number of sheets is rounded up to the nearest multiple of n, 

where n is the size of the signature)

Change the main function so that it prints in addition to the previous three numbers:

• The price of printing 35 black and white books of 34 pages each with 8 fold 

signatures.

• The price of printing 100 black and white books of 34 pages each with 6 fold 

signatures.

Please note: For this extension you must print 5 numbers (the original [under a 16 fold 

signature], two for the first extension, two for this second extension).

This coursework is to be completed during week 3, to be submitted by Tuesday week 4.

Тагове:
-16
C Programming 02/11/2015 19:34:17
enevlogiev:
Oкей, всички му дадохте ценни съвети, човекът сега ще се постарае и ще си напише домашното.
slavpetroff avatar slavpetroff Trainer 155 Точки

Не разбирам,защо изобщо учиш тази специалност?Това е все едно,да ти кажат напиши първите 10 букви от азбуката.Между другото е много грешно схващането ти за университет.Тъй като повечето хора са свикнали в подобни висши учебни заведения,не да учат,а да търсят начин да си вземат изпита,явно си решил,че щом името е "Софт Уни" и тук е така.Но разликата в системата на обучение още със задаването на въпроса ти излиза на яве.Тук хората са дошли,за да се научат и да могат,да вършат нещо.Силно ти препоръчвам,да намериш предмета или заниманието,което ще те накара и теб,да го правиш!Аз съм много радостен от факта,че от колегите,нито един не е постнал решение.Това показва страшно много,какво е нивото на образованието в Софт Уни!

6
Можем ли да използваме бисквитки?
Ние използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Можете да се съгласите с всички или част от тях.
Назад
Функционални
Използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Използваме „сесийни“ бисквитки, за да Ви идентифицираме временно. Те се пазят само по време на активната употреба на услугите ни. След излизане от приложението, затваряне на браузъра или мобилното устройство, данните се трият. Използваме бисквитки, за да предоставим опцията „Запомни Ме“, която Ви позволява да използвате нашите услуги без да предоставяте потребителско име и парола. Допълнително е възможно да използваме бисквитки за да съхраняваме различни малки настройки, като избор на езика, позиции на менюта и персонализирано съдържание. Използваме бисквитки и за измерване на маркетинговите ни усилия.
Рекламни
Използваме бисквитки, за да измерваме маркетинг ефективността ни, броене на посещения, както и за проследяването дали дадено електронно писмо е било отворено.