Create a program for calculating the cost of the purchase, taking into account the discount.

Create a program for calculating the cost of the purchase, taking into account the discount. A 10% discount is provided if the purchase amount is more than 1000 rubles. Below is the recommended screen view while working with the program. Enter the purchase amount 1200 Purchase amount including discount 1080.

var a, b: real;
begin
writeln (‘Enter price:’);
readln (a);
b: = 10;
b: = a / b;
if (a> 1000) then
begin
writeln (‘Discount 10%’);
a: = a-b;
write (‘Price with discount:’, a: 2: 2);
readln;
end
else
begin
write (‘Price:’, a: 2: 2);
readln;
end;
end.
The second version of the program execution:
var
summa, skidka: real;
begin
writeln (‘Calculating the purchase price taking into account the discount.’);
writeln (‘Enter the purchase amount:’);
readln (summa);
if summa> 1000 then skidka: = 10;
writeln (‘You got a discount’, skidka, ‘%’);
writeln (‘Purchase amount with discount:’, (summa- (summa * skidka) / 100));
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.