DinamikDj
22.08.2022 13:16

Write a line of code that prints the integer portion of the number 21.45 2. Write a line of code that prints a random number between 1 and 6 3. Assume that a user enters any number and that the number is stored in the variable userNumber. Write a line of code that converts the input to a float. Then write a line of code that prints the positive value of the user’s input. 4. Write a line of code that calculates the square root of 900 and stores the result in the variable answer. 5. Revisit the programs you have written in the past. Write down all of the predefined routines you have used and for each one identify if it is a function or a procedure.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
главныймозг74
15.08.2021 22:57
Program fofgogjoj;
 var   
arr: array[1..1000] of byte;   
max_num, min_num: byte;   
i: byte;   
n,p:integer; 
begin   
randomize; 
Wriiteln('Введите число n');
Readln(n);   
for i := 1 to n do begin       
arr[i] := random(100);       
 Write (arr[i]:3);   
end;       
 max_num := arr[1];    
for i := 2 to n do       
 if arr[i] > max_num then
begin                     
max_num := arr[i];       
end;    
Writeln;   
Writeln ('Max = ',max_num);          
min_num := arr[1];    
for i := 2 to n do       
if arr[i] < min_num then
begin                      
min_num := arr[i];       
end;       
Writeln;   
Writeln ('Min = ',min_num);       
P:=max_num*min_num;   
Writeln('Произведение равно:',p); 
end.
0,0(0 оценок)
Ответ:
пацанизшараги
12.04.2020 03:57
Uses crt;
label goback;
var
a,b,c,d,e,f:integer;
begin
goback:
write('Введите число: ');read(a);
if (a<1000) or (a>9999) then 
  begin
    writeln('Введите четырехзначное число.');
    goto goback;
end;
b:=a div 1000;
c:=a div 100 mod 10;
d:=a div 10 mod 10;
if (b=c) and (c=d) then  begin    writeln('Первые 3 цифры равны.');  end;
if (b=c) and (c>d) then  begin    writeln(d,' - Наименьшая цифра из первых 3 цифр.');end;
if (d=b) and (b>c) then  begin    writeln(c,' - Наименьшая цифра из первых 3 цифр.');end;
if (c=d) and (d>b) then  begin    writeln(b,' - Наименьшая цифра из первых 3 цифр.');end;
if (b>c) and (c>d) and (b>d) then  begin    writeln(d,' - Наименьшая цифра из первых 3 цифр.');end;
if (c>d) and (d>b) and (c>b) then  begin    writeln(b,' - Наименьшая цифра из первых 3 цифр.');end;
if (b>d) and (d>c) and (b>c) then  begin    writeln(c,' - Наименьшая цифра из первых 3 цифр.');end;
if (b mod 2 = 0) then  begin    writeln('Первая цифра четная');  end;if (c mod 2 = 0) then  begin    writeln('Вторая цифра четная');end;
if (b mod 2 = 0) and (c mod 2 = 0) then  begin    writeln('И первая и вторая цифра четная');  end;
if (b mod 2 = 1) and (c mod 2 = 1) then  begin    writeln('И первая и вторая цифра не четная');end;
End.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота