Есть ответ 👍

Даны следующие типы данных: type date = record day : 1..31; mounth : 1..12; year : integer; end; person = record surnamename : string; birthday : date; end; listofpeople = array [1..50] of person; напишите программу, которая вводит с клавиатуры данные о n лицах(n< =50) и выводит на экран: фамилию и имя самого младшего человека

177
215
Посмотреть ответы 2

Ответы на вопрос:


Program pro1; type date = record  day : 1..31;   mounth : 1..12;   year : integer;   end;   person = record  surnamename : string;   birthday : date;   end;   listofpeople = array [1..50] of person; var people: listofpeople; jounghuman: integer; i, jounghumanindex: byte; beginfor i: =1 to 50 dobegin write('human '+inttostr(i)+': ')write('input surname and name: ')readln(people[i].surnamename); write('input birthday date(day, mounth, year) : ')read(people[i].birthday.day, people[i].birthday.mounth, people[i].birthday.year); end; // jounghumanindex: =1; //jounghuman: =people[1].birthday.day + people[1].birthday.mounth*13 + people[1].birthday.year * 32 * 13; for i: =2 to 50 doif  jounghuman> people[i].birthday.day + people[i].birthday.mounth*13 + people[i].birthday.year * 32 * 13 thenbegin // jounghumanindex: =i; // jounghuman: =people[i].birthday.day + people[i].birthday.mounth*13 + people[i].birthday.year * 32 * 13; end; writeln('most joung human: '+people[jounghumanindex] .surnamename); end.
girb13
4,7(4 оценок)

1input "n=", n s = 0 for i = 1 to n     s = s + i ^ 2 next i print 4 * s 2 10 минут - это 1/6 часа и суммировать дроби, в знаменателе которых число 6, означает накапливать погрешности представления нецелых чисел в эвм. поэтому расчеты лучше делать в минутах, а результат потом перевести в часы. получаем сумму s=60м+(60м+10)+(60м+20)++[60м+10*(n-1)] input "m,n=", m, n print 5 * n * (12 * m + n - 1) / 60 вот такие получаются короткие программы, если сначала думать, а потом писать.

Популярно: Информатика