Question: Write a script which will accept 2 numbers and calculate for their difference (NOTE: difference is the result of subtraction). If the difference is

Write a script which will accept 2 numbers and calculate for their 

Write a script which will accept 2 numbers and calculate for their difference (NOTE: difference is the result of subtraction). If the difference is negative, display the message "The difference of the entered numbers is negative". Otherwise, ask the user to enter a character, filename and directory name. Based on the entered character, use a case structure to implement the tasks on the given table below. (6 Marks) Character Tasks H Display the first 8 lines of the entered file R Delete the entered file L Display a list of the files and directories under the entered directory C Create a copy of the entered file under the entered directory. default Display the message "Unrecognized Input"

Step by Step Solution

3.53 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Accepting two numbers from the user read p Enter the first number num1 read p Enter the second number num2 This block prompts the user to enter two numbers and stores them in the variables num1 and nu... View full answer

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 Programming Questions!