Home computickets After 39 lines, commands are not executed, why? How to fix it?

# After 39 lines, commands are not executed, why? How to fix it?

Author

Date

Category

In the aerobus, which accommodates 160 passengers, three quarters of the places are located in the economy class salon and one quarter of the places – in the business class cabin.
The cost of a ticket in the business class cabin is x rubles, which is two times higher than the cost of the ticket in the economy class.

Purpose:

It is necessary to calculate the amount of money received by the airline from the sale of tickets for one flight, if it is known that there are unreasonable A business class tickets and b tickets of the economic class.

``````Program Air_1;
VAR A, B, C, D, E, F, G, X, Y, K, L, V: REAL;
// A - not sold out business class tickets.
// B - not sold out economy class tickets.
// C - the number of places in the business class.
// D - the number of places in the economy class.
// E - business class ticket.
// F - the cost of the ticket in the economy class.
// G - the total number of places in the aircraft.
// X - the number of places sold in business class.
// Y - the number of seats sold in economy class.
// k - earned money for the business class.
// L - earned money for economy class.
// V - the total affair airline for this flight.
Begin.
Write ('Enter the number of places in the aircraft');
C: = G / 4 * 3;
D: = G / 4 * 1;
Writeln ('C =', C);
Writeln ('D =', D);
Writeln ('Enter the cost of the business class');
F: = E / 2;
Writeln ('E =', E);
Writeln ('F =', F);
writeln ('how many seats are not sold in business class');
x: = C-A;
writeln ('how many seats are not sold in economy class');
y: = d-b;
k: = x * e;
L: = y * f;
Writeln ('The company earned on business class', k, 'rubles.');
Writeln ('The company earned on the economy class', l, 'rubles.');
V: = k + l;
Writeln ('Airlines received for this flight', V, 'rubles.');
end.
``````

You have two extra efflores:

``````readln (k)
``````

and

``````readln (L)
``````

code should look like this:

``````Program Air_1;
VAR A, B, C, D, E, F, G, X, Y, K, L, V: REAL;
Begin.
Write ('Enter the number of places in the aircraft');
C: = G / 4 * 3;
D: = G / 4 * 1;
Writeln ('C =', C);
Writeln ('D =', D);
Writeln ('Enter the cost of the business class');
F: = E / 2;
Writeln ('E =', E);
Writeln ('F =', F);
writeln ('how many seats are not sold in business class');
x: = C-A;
writeln ('how many seats are not sold in economy class');
y: = d-b;
k: = x * e;
L: = y * f;
Writeln ('The company earned on business class', k, 'rubles.');
Writeln ('The company earned on the economy class', l, 'rubles.');
V: = k + l;
Writeln ('Airlines received for this flight', V, 'rubles.');
end.
``````

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.