![]() |
|
Модераторы: Poseidon |
![]()
|
|
| custard |
|
|||
![]() Новичок Профиль Группа: Участник Сообщений: 20 Регистрация: 21.10.2006 Репутация: нет Всего: нет |
нужно написать код используя эти structures
надо писать с Dynamic Memory Allocation (malloc)
Юзер входит это Please enter your choice: 1. Polynomial addition 2. Polynomial multiplication 3. Intersection of lines 4. The nearest point of a circle to the mid-point of a line 5. The point in the middle of the mid-points of two lines 6. Length of a line 7. Area of a circle 8. Exit например выбрал 1-ый пункт сделал полиномиал адишн потом спрашиваешь что шас хочешь сделать пока юзер не напишеT Exit-t.e 8 функции для использования • inputPolynomial: Inputs a polynomial from the user o Ask the degree of the polynomial, allocate the coeff member accordingly, read the coefficients one by one and make the resulting polynomial visible in the scope that calls this function (either using call-by-value or call-by reference) • inputPoint: Inputs a point from the user o Read the coordinates of a point and return the resulting point to the caller scope (again either using call-by-value or call-by reference) • inputCircle: Inputs a circle from the user o Read the parameters of a circle and return the resulting circle to the caller • inputLine: Inputs a line segment from the user o Read the two points of a line and return the resulting line to the caller оутпут функции • outputPolynomial: Prints a given polynomial in an orderly way • outputPoint: Outputs the coordinates of a given point imn an orderly way. • outputArea: Outputs the area of a given circle in an orderly way • outputLength: Outputs the length of a given line segment in an orderly way The operational functioms you must implement are: • polyAdd (Operation 1) • polyMult (Operation 2) • lineIntersect (Operation 3) • pointNearest (Operation 4) • pointMiddle (Operation 5) • length (Operation 6) • area (Operation 7) The basic data types to be used in the project are defined as follows: //Keeps the coefficients of a polynomial of a particular degree //coeff[0] is supposed to keep the constant term (of degree 0) //coeff[1] is supposed to keep the term of degree 1 (x^1) //coeff[2] is supposed to keep the term of degree 2 (x^2) //coeff[3] is supposed to keep the term of degree 3 (x^3) Это сообщение отредактировал(а) Exception - 22.12.2006, 20:35 |
|||
|
||||
![]()
|
| Правила форума "Центр помощи" | |
|
|
ВНИМАНИЕ! Прежде чем создавать темы, или писать сообщения в данный раздел, ознакомьтесь, пожалуйста, с Правилами форума и конкретно этого раздела.
Более подробно с правилами данного раздела Вы можете ознакомится в этой теме. Если Вам помогли и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, Poseidon, Rodman |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | Центр помощи | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |