Вопрос задан 18.10.2018 в 13:21. Предмет Информатика. Спрашивает Бомбир Даниил.

Составьте на Паскале программу, которая определит, является ли целое число N четным двузначным

числом.
0 0
Перейти к ответам

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

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Петровская Алиса.
Program abc;
var n : integer;
begin
writeln('Введите целое число:');
readln(n);
if (n mod 2=0) and (n div 100=0) and (n div 10>0) then 
  writeln ('Это чётное двухзначное число') else
  writeln ('Это число не является чётным двухзначным')
end.

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

Pascal Program to Determine if an Integer N is an Even Two-Digit Number

Here is a Pascal program that can determine whether an integer N is an even two-digit number:

```pascal program CheckEvenTwoDigitNumber;

var N: integer;

begin write('Enter a number: '); readln(N);

if (N >= 10) and (N <= 99) and (N mod 2 = 0) then writeln(N, ' is an even two-digit number.') else writeln(N, ' is not an even two-digit number.');

end. ```

Explanation: - The program prompts the user to enter a number. - It checks if the number is between 10 and 99 (inclusive) using the condition `(N >= 10) and (N <= 99)`. - It also checks if the number is even using the condition `N mod 2 = 0`. - If both conditions are true, it displays a message indicating that the number is an even two-digit number. Otherwise, it displays a message indicating that the number is not an even two-digit number.

Please note that this program assumes the input is an integer. If the input is not an integer, the program may produce unexpected results.

Let me know if you need any further assistance!

0 0

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

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

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