Ввести с клавиатуры три года рождения. Программа должна проверить есть ли среди них номер ваш год рождения. Если есть то на экран вывести сообщение: ГОД ВАШЕГО РОЖДЕНИЯ ЕСТЬ, если иначе: НЕТ ВАШЕГО ГОДА РОЖДЕНИЯ. PascalABC.
Uses GraphABC; procedure Draw(x, y, l, u : Real; t : Integer);
procedure Draw2(Var x, y: Real; l, u : Real; t : Integer); begin Draw(x, y, l, u, t); x := x + l*cos(u); y := y - l*sin(u);end; begin if t > 0 then beginl := l/3;Draw2(x, y, l, u, t-1);Draw2(x, y, l, u+pi/3, t-1); Draw2(x, y, l, u-pi/3, t-1);Draw2(x, y, l, u, t-1);end else Line(Round(x), Round(y), Round(x+cos(u)*l), Round(y-sin(u)*l))end; begin SetWindowSize(425,500); SetWindowCaption('Фракталы: Снежинка Коха'); Draw(10, 354, 400, pi/3, 4);Draw(410, 354, 400, pi, 4); Draw(210, 8, 400, -pi/3, 4);end.
//Описание добавить не вышло на сайт, посему - в файле
#include "stdafx.h" #include <conio.h>
void swap(short &a, short &b) { short c = a; a = b;
b = c; }
void sort(short &a, short &b, short &c) { short min = a, max = c; if (min > b) min = b; if (min > c) min = c; if (max < a) max = a; if (max < b) max = b; b = a + b + c - min - max; a = min; c = max; }
if ((a1 == a2) && (b1 == b2) && (c1 == c2)) printf("Boxes are equal"); else if ((a1 <= a2) && (b1 <= b2) && (c1 <= c2)) printf_s("The first box is smaller than the second one"); else if ((a2 <= a1) && (b2 <= b1) && (c2 <= c1)) printf_s("The first box is larger than the second one"); else printf_s("Boxes are incomparable");
procedure Draw(x, y, l, u : Real; t : Integer);
procedure Draw2(Var x, y: Real; l, u : Real; t : Integer);
begin
Draw(x, y, l, u, t);
x := x + l*cos(u);
y := y - l*sin(u);end;
begin
if t > 0 then
beginl := l/3;Draw2(x, y, l, u, t-1);Draw2(x, y, l, u+pi/3, t-1);
Draw2(x, y, l, u-pi/3, t-1);Draw2(x, y, l, u, t-1);end
else
Line(Round(x), Round(y), Round(x+cos(u)*l), Round(y-sin(u)*l))end;
begin
SetWindowSize(425,500);
SetWindowCaption('Фракталы: Снежинка Коха');
Draw(10, 354, 400, pi/3, 4);Draw(410, 354, 400, pi, 4);
Draw(210, 8, 400, -pi/3, 4);end.