# New to Pascal - Trying to do some basic stuff

So I'm new at learning at Pascal, and I'm just trying to make a simple circumference program. This is what I have:

[code]
program Circumference;

const
pi = 3.14159265;

var
circumference : real;

begin
write ('What is the radius of the circle? ');
circumference := 2 * pi * radius;
writeln ('The circumference is:' circumference);
end.
[/code]
But it doesn't work, any tips?

• : So I'm new at learning at Pascal, and I'm just trying to make a
: simple circumference program. This is what I have:
:
: [code]:
: program Circumference;
:
: const
: pi = 3.14159265;
:
: var
: radius : integer;
: circumference : real;
:
: begin
: write ('What is the radius of the circle? ');
: circumference := 2 * pi * radius;
: writeln ('The circumference is:' circumference);
: end.
: [/code]:
: But it doesn't work, any tips?
:
First, the variable [b]circumference[/b] is a dupe of the program name. That's not allowed.
Second, you need a comma after the string in the writeln statement.
Third, why is radius an integer? It works, but only if you enter an integer. If you enter a real (with a decimal point) you get a run-time error.
Fourth, your output will be in scientific notation. Is this what you want?