Hometask (until 6/10)
Обращайте особое внимание на графу «Последний срок сдачи» внизу страницы с любым заданием (кроме лабораторных): после этого срока сдать работу будет нельзя. При возникновении трудностей с решением какой-либо задачи следует найти преподавателя до наступления дедлайна и проконсультироваться с ним по этому вопросу.
Follow the requirements for labs.
Hometask
Part I. Boolean operations
In the first part of the task it is forbidden to use the conditional operator.
1. [htask-01-b.pas]
Two integers are given. Print True
if the first number is not less than the second and print False
otherwise.
12, 4 >>> True -3, 0 >>> False 2, 2 >>> True
2. [htask-02-b.pas]
Integers x
and y
are given. Print True
if a point with coordinates (x, y)
lies in the second or third coordinate quarter and print False
otherwise.
3. [htask-03-b.pas]
A three-digit integer is given. Print True
if all the digits of the given number are different and print False
otherwise.
Part II. If-statement
4. [htask-04-if.pas]
Three integers are given. Find the number (amount) of positive and the number (amount) of negative numbers among them.
-3, 0, -2 >>> posCnt = 0, negCnt = 2
5. [htask-05-if.pas]
Three integers are given. Find the average of them (that is, the number between the smallest one and the largest).
-3, 10, 5 >>> 5 0, -1, 0 >>> 0 6, 6, 6 >>> 6 7, -2, -2 >>> -2
6. [htask-06.pas]
For a given integer x
find the value of the following function f
the argument of which is an integer: