The Bloodshed version of this software is obsolete
(last update in 2005), this should not be used.
There is an up to date version called Orwell
DevC++ which is ok to use.
Latest version is 5.4.2 - 25 May 2013
Above code compiled with this gives the messages:
...\Untitled10.cpp In function 'int main()':
21 7 ...\Untitled10.cpp [Error] expected ';' before 'area'
26 7 ...\Untitled10.cpp [Error] expected ';' before 'system'
15 20 ...\Untitled10.cpp [Warning] unused variable 'PI' [-Wunused-variable]
That is very specific. It gives the line number and column where the error was found, and states what the problem is.
There are two semicolons missing (at the end of the previous line in each case).
There is also a warning, which is less significant than an error, that the variable PI is not used.
After adding the missing semicolons, that warning goes away.
I had to add this header to get it to compile:
After that, there is another warning message:
[Warning] variable 'radius' set but not used
This is a useful message, as looking at the code we see line 19
radius = (diameter / 2.0);
but after that radius is never used, which looks like a (small) mistake.