How do I program the following task in Lazarus using the programming language: Pascal(Script)?

Task 2 – Foam decay

The foam in a beer glass breaks down by 15% per minute.

a) Develop a program that, for an initial foam height of 13 cm, calculates the time it takes for the foam to reduce to 1 cm of its initial height. The program outputs the remaining foam height for each minute.

b) Extend the program to allow the input of the variable n, so that the time until the foam has reduced to n cm is measured. At the same time, the foam height should also be read as a variable.

The program will use edit fields, a button, and a label. The data types are either string, double, or integer.

Thank you in advance😁

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
5 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
IrgenwerFragt
1 year ago

With the programming language you have made the worst choice in any case.

Your question is too general. If you want to try a finished program, say it honestly, because your question doesn’t suggest you want to do something and you have thoughts or even work.

Get ready-made solutions by ChatGPT.

verreisterNutzer
1 year ago
Reply to  IrgenwerFragt

Why a bad choice? Pacal is a great language.

IrgenwerFragt
1 year ago

Because there are hardly good free interpreters, hardly docu and little help with problems. In the economy this language is as good as unimportant. Support is small.

In programming language trends, dise language does not even appear among the 1% candidates.

verreisterNutzer
1 year ago

Oh, well, it’s just an exotic.

Support is still enough.