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
|