Вопрос задан 25.02.2019 в 00:05. Предмет Информатика. Спрашивает Ісанський Ростик.

написать программу в Pascal и составить её блок -схему: по возрасту, введённому с клавиатуры,

определить, к какой возрастной группе относится человек: от 0 до 7 лет дошкольник. от 8 до 17 лет школьник, от 18 до 23 лет студент, 24-55 лет работник, от 56 лет и старше пенсионер.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Ишбирдин Динар.

var
l:integer;
begin
writeln('skolko let?');
readln(l);
if (l>=0) and (l<=7) then
writeln('Doshkolnik')
else if (l>=8) and (l<=17) then
writeln('shkolnik')
else if (l>=18) and (l<=23) then
writeln('student')
else if (l>=24) and (l<=55) then
writeln('rabotnik')
else if l>=56 then
writeln('pensioner');
end.

0 0
Отвечает Сокур Валерия.

var

  a:integer;

begin

  write('Введите возраст '); readln(a);

  write('Этот человек ');

  case a of

    0..7: writeln('дошкольник');

    8..17: writeln('школьник');

    18..23: writeln('студент');

    24..55: writeln('работник');

    else

     writeln('пенсионер');

  end;

end.

0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Program in Pascal to Determine Age Group

Here is a program in Pascal that determines the age group based on the age entered from the keyboard:

```pascal program AgeGroup;

var age: integer;

begin writeln('Enter your age:'); readln(age);

if (age >= 0) and (age <= 7) then writeln('You belong to the preschool age group.'); if (age >= 8) and (age <= 17) then writeln('You belong to the school age group.'); if (age >= 18) and (age <= 23) then writeln('You belong to the student age group.'); if (age >= 24) and (age <= 55) then writeln('You belong to the working age group.'); if (age >= 56) then writeln('You belong to the retirement age group.');

readln; end. ```

Block Diagram

Here is a block diagram representing the logic of the program:

``` Start | |--- Read age from keyboard | |--- If age >= 0 and age <= 7 | | | |--- Print "You belong to the preschool age group." | |--- If age >= 8 and age <= 17 | | | |--- Print "You belong to the school age group." | |--- If age >= 18 and age <= 23 | | | |--- Print "You belong to the student age group." | |--- If age >= 24 and age <= 55 | | | |--- Print "You belong to the working age group." | |--- If age >= 56 | | | |--- Print "You belong to the retirement age group." | End ```

Please note that this program assumes the age entered is a positive integer.

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос