Public feed #602503

Complex Abs - intimidat0r

public text v1 · immutable
Raw Edit
·published 2007-07-04 03:18 UTC
rendered paste body
#!/usr/bin/perl

print "Real part: ";
chomp($real = <STDIN>);

print "i coefficient: ";
chomp($imag = <STDIN>);

$abs = sqrt($real*$real + $imag*$imag);

print "Absolute value: $abs\n";