Answer to Question #54065 in Perl for zexy
Write a program called tripper that will ask the user the number of miles he has driven and the amount of gas he used. In the tripper script, write a subroutine called mileage that will calculate and return the user's mileage (miles per gallon). The number of miles driven and the amount of gas used will be passed as arguments. All variables should be my variable. Print the results. Prototype tripper.
No comments. Be first!