$30
CECS 524 Unit 2 Assignments
Reading Assignments:
Chapter 2 in Concepts of Programming Languages
Youtube - https://www.youtube.com/watch?v=Og847HVwRSI
o Most Popular Programming Languages 1965 - 2019
Programming Assignment - Due Sep 16, 6 pm in BB Dropbox
As the video makes clear, Pascal was once the most used language in programming, mostly due to the
availability of Turbo Pascal, by Borland. One of the first IDEs, you could edit, compile and run in one
program. TP also produces DOS executables.
Locate a Pascal compiler - there are some online ones and you can download from source forge "Free
Pascal Compiler", which seems to be not much more than Turbo Pascal, stolen and repackaged for various
platforms.
Write a Pascal program that solves quadratic equations for real and imaginary roots.
This program calculates the real or imaginary roots of a quadratic
equation.
Input is of the form A B C where A,B and C are the coefficients of the
equation
Enter 0 0 0 to quit
Enter a b c values:1 0 -9
Roots are real...
Root1 = 3.0000000000000000E+000
Root2 = -3.0000000000000000E+000
Enter a b c values:1 6 9
One real root...
Root1 = -3.0000000000000000E+000
Enter a b c values:1 0 4
Roots are imaginary...
Root1 = i* 2.0000000000000000E+000
Root2 = i*-2.0000000000000000E+000
Enter a b c values:0 0 0
3 equations were solved.
Turn in the source code and a screen shot of a run with at least 3 equations to the Beachboard Dropbox for
Unit-2.
This program is at the level of first semester programming. About 50 lines long. Don’t make a big thing out
of it. Literally.
The output from FPC's output window is not stable. However, the executable (which is found by default in
the FPC\3.2.0\bin\i386-win32 directory is stable. Best to run that program and not try to get output from
this FPC directly. The executable is produced by the compiler (TP) and not by the half-wits that wrapped TP
in their unstable environment. So just "Compile" in FPC and don't "Run" in FPC. Run at the command line.