View difference between Paste ID: uKuRQEAG and ccChfWTm
SHOW: | | - or go back to the newest paste.
1-
#!C:\Strawberry\perl\bin
1+
#!C:\Strawberry\perl\bin 
2
use warnings;
3
4
my $stop = 0;
5
until ($stop != 0) {	
6
	
7
	
8
print "this program will compute the circumfrence of a circle.\n";
9
print "\n";
10
print "Please enter in the radius of your circle.\n";
11
$radius = <STDIN>;
12
until ($radius ne "\n") {
13
	print "please enter a number ";
14
	$radius = <STDIN>;
15
}
16
17
print "The radius of your circle is ";	
18
print 2 * 3.141592654 * $radius;
19
print "\n";
20
print "do you want to calculate another?(yes/no)\n";
21
$stop = 0;
22
$answer = <STDIN>;
23
if ($answer eq "no") {
24
	print "exiting.... \n";
25-
	exit;
25+
26
	
27
} else {
28
	$stop = 0;
29
}
30
}