View Single Post
Old 03-03-2004, 09:48 PM   #1 (permalink)
VF19
Banned
 
Location: back to my old location
[perl] Powers!?! Where?

How do I get a number to be multipied by its power in perl?
Im trying to solve this equation, y=c(1+r)[to the power of]t
but im stuck at where to multiply (1+r) by t.
Heres the script so far:

Quote:

#!usr/bin/perl;

use warnings;

print "You solve the y=c(1+r)t problem with this program. \n";

print "Enter c variable. \n";

my $cvar = <STDIN>;

print "Enter r variable. \n";

my $rvar = <STDIN>;

print "Enter t variable. \n";

my $tvar = <STDIN>;

chomp " $cvar , $rvar , $tvar ";

my $rvar1 = 1+r ;

my $r2tvar = $rvar1

VF19 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76