Вопрос задан 19.08.2018 в 13:05. Предмет Информатика. Спрашивает Кулагин Илья.

Дано целое число, Напишите программу, которая уменьшает это число в 2 раза и выводит на экран

монитора результат
0 0
Перейти к ответам

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

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

Пишите язык, на котором вам это нужно. Кто-нибудь же поиздевается и напишет на brainfuck-e.

 

Паскаль:

var a:integer;

begin

  readln(a);

  writeln(a/2)

end.

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

Program to Halve a Given Number and Display the Result

To write a program that halves a given number and displays the result, you can use the following Python code:

```python # Input the number number = int(input("Enter a number: "))

# Halve the number halved_number = number / 2

# Display the result print("The halved number is:", halved_number) ```

This program first takes an input from the user, then halves the input number, and finally displays the halved result on the screen.

This code uses the division operator (/) to halve the input number and the print function to display the result on the screen.

Note: This code assumes that the input will be a valid integer. If you want to handle potential errors from invalid inputs, additional input validation and error handling can be added to the program.

0 0

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

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

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