Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    print"\n Enter the Filename (x.txt) with Data in List context: ";
    ...
    $mean=$sum/$N_elements;    # Line 21  
    print"\n Mean of the list= $mean\n";
    exit;
    
  2. or download this
    Enter the Filename (x.txt) with Data in List context: x.txt
    
     List= (10,12,14,16,18);
    ...
     line 21, <FILE> line 1.
    
     Mean of the list= 0
    
  3. or download this
    Enter the Filename (x.txt) with Data in List context: x.txt
    
     List= (10,12,14,16,18);
    ...
     Number of Elements= 5
    
     Mean of the list= 14