из банка на выплату зарплаты привезли а рублей хватит ли этой суммы если на предприятии n работников их средняя зарплата s рублей а в кассе еще имеется остаток k рублей (Решить в PascalABC)
program Payment; var a, n, s, k, totalPayment: integer; begin writeln('Enter the amount of money brought from the bank: '); readln(a); writeln('Enter the number of employees: '); readln(n); writeln('Enter the average salary of each employee: '); readln(s); writeln('Enter the remaining amount of money in the cash register: '); readln(k);
totalPayment := n * s + k;
if totalPayment <= a then writeln('There is enough money for the salaries.'); else writeln('There is not enough money for the salaries.'); end.
program Payment;
var
a, n, s, k, totalPayment: integer;
begin
writeln('Enter the amount of money brought from the bank: ');
readln(a);
writeln('Enter the number of employees: ');
readln(n);
writeln('Enter the average salary of each employee: ');
readln(s);
writeln('Enter the remaining amount of money in the cash register: ');
readln(k);
totalPayment := n * s + k;
if totalPayment <= a then
writeln('There is enough money for the salaries.');
else
writeln('There is not enough money for the salaries.');
end.