
Надо написать программу решения арифметического среднего трех чисел. Паскаль abc. Помогите,
пожалуйста))

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

int a, b, c;
string value;
double z;
Console.WriteLine("Введите первое число");
value = Console.ReadLine();
a = Convert.ToInt32(value);
Console.WriteLine("Введите второе число");
value = Console.ReadLine();
b = Convert.ToInt32(value);
Console.WriteLine("Введите третье число");
value = Console.ReadLine();
c = Convert.ToInt32(value);
z = (a + b + c) / 3;
Console.WriteLine("Среднее арифметическое = " + z);
Console.ReadKey();



begin
writeln('Введите a,b,c: ');
readln(a,b,c);
writeln('Среднее арифметическое = ',(a+b+c)/3);
end.



Program to Calculate the Arithmetic Mean of Three Numbers in Pascal
To calculate the arithmetic mean of three numbers in Pascal, you can use the following program:
```pascal program CalculateArithmeticMean; var num1, num2, num3, mean: real; begin write('Enter first number: '); readln(num1); write('Enter second number: '); readln(num2); write('Enter third number: '); readln(num3); mean := (num1 + num2 + num3) / 3; writeln('The arithmetic mean of ', num1, ', ', num2, ' and ', num3, ' is: ', mean:0:2); end. ```
This program prompts the user to enter three numbers, calculates their arithmetic mean, and then displays the result.
Note: This is a simple program to calculate the arithmetic mean of three numbers in Pascal. It assumes that the user will input valid numerical values.
I hope this helps! If you have any further questions or need additional assistance, feel free to ask.


Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili