
Помогите!!!!! Очень срочно Задачи необходимо написать на языке Паскаль…. 2.9. Три шахматиста
играют в шахматы. Известно количество очков, набранных каждым из них. Составить программу, которая определит, на сколько очков победитель оторвался от самого слабого игрока. 3.10. На склад поступают груза на машинах различной грузоподъемности. Одновременно на компьютер, обслуживающий склад, поступает информация о весе груза на каждой машине. Составить программу, определяющую количество машин, прибывших с грузом до полного заполнения склада, если известно, что склад вмещает 1000 тонн груза.

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

В 2.9 нужно, как я понял, просто вычесть из кол-ва очков победителя кол-во очков самого слабого игрока.
В 3.10 - не совсем понятно как получаем данные. Вводятся вручную или уже загружены заранее? В любом случае можно сделать через цикл (для простоты напишу на питоне программу с ручным заполнением):
i = 0
while i < 1000:
a = int(input())
i += a
print("Склад заполнен на ", i / 1000 * 100, "% (", i, ")") #опционально
P.S. Паскаль не помню, извини.



Problem 2.9: Calculating the Point Difference in a Chess Game
To solve this problem, we need to write a program that calculates the point difference between the winner and the weakest player in a chess game. We are given the number of points scored by each player.
Here's a possible solution in Pascal:
```pascal program ChessPoints;
var player1, player2, player3, minPoints, maxPoints, pointDifference: integer;
begin writeln('Enter the number of points scored by each player:'); readln(player1, player2, player3);
// Find the minimum and maximum points minPoints := player1; maxPoints := player1;
if player2 < minPoints then minPoints := player2; if player3 < minPoints then minPoints := player3;
if player2 > maxPoints then maxPoints := player2; if player3 > maxPoints then maxPoints := player3;
// Calculate the point difference pointDifference := maxPoints - minPoints;
writeln('The winner is ', maxPoints, ' points.'); writeln('The weakest player scored ', minPoints, ' points.'); writeln('The point difference is ', pointDifference, ' points.');
end. ```
This program prompts the user to enter the number of points scored by each player. It then finds the minimum and maximum points and calculates the point difference. Finally, it displays the winner, the weakest player, and the point difference.
Example Input: ``` Enter the number of points scored by each player: 5 7 3 ```
Example Output: ``` The winner is 7 points. The weakest player scored 3 points. The point difference is 4 points. ```
Problem 3.10: Counting Trucks with Full Load on a Warehouse
To solve this problem, we need to write a program that counts the number of trucks that have arrived at a warehouse with a total load capacity of 1000 tons. We are given the weight of each truck.
Here's a possible solution in Pascal:
```pascal program Warehouse;
const MAX_CAPACITY = 1000;
var weight, totalWeight, truckCount: integer;
begin writeln('Enter the weight of each truck (in tons):'); totalWeight := 0; truckCount := 0;
repeat readln(weight); totalWeight := totalWeight + weight; truckCount := truckCount + 1; until totalWeight >= MAX_CAPACITY;
writeln('The number of trucks that arrived with a full load is ', truckCount);
end. ```
This program prompts the user to enter the weight of each truck in tons. It keeps track of the total weight and the number of trucks that have arrived. The program continues to read the weight of each truck until the total weight exceeds or equals the maximum capacity of the warehouse (1000 tons). Finally, it displays the number of trucks that arrived with a full load.
Example Input: ``` Enter the weight of each truck (in tons): 200 300 150 400 ```
Example Output: ``` The number of trucks that arrived with a full load is 2 ```
Please note that these are just example solutions, and there may be other ways to solve these problems in Pascal.


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