Question: perl programming unix/linux There are 45 grades in the file but the user can decide the number of grades he/she wants to process. Your program

perl programming unix/linux

There are 45 grades in the file but the user can decide the number of grades he/she wants to process. Your program must ask the user for the quantity of grades to be processed and validate the value entered (it must be within the range 0..45). If the value entered is invalid the program must not accept it and ask again for the number until a valid value is entered.

My code:

#!/usr/bin/perl print ("Please enter number of values to process: "); $number = ; $average; $total;

open (FILEIN, "input8.txt") || warn "Could not open students file ";

while () { $FILEIN[$number]= "$_ ";

}

print ("Grades processed:$number "); print (" Total accumulated: "); print ("The average is: ");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!