please help perl programming. im stuck on this one part can anyone help?

  • Thread starter Thread starter el gizmo magnifico
  • Start date Start date
E

el gizmo magnifico

Guest
ok here is what im stuck on

given the code below create printf statements at the end of the program to Program the following tasks.

here is the program

#!/usr/bin/perl

$inputString = "Exam 2" ;

$width = 12 ;
$length = 3.1415 ;

$salary = 75200.35 ;
$payment = 312.77 ;


here is the parts im stuck on

1. print $inputString on it's own line in a field 12 characters wide
2. print $length and $width that is 10 characters wide with four places to the right of the decimal point.
3. print $salary and $payment on it's own line. Each of the values should look like US currency (2 places to the right of the decimal point) and show the "$" sign.

thanks for all the help and if it possible to get it to me soon it would be a great help.
 
Back
Top