Professional Documents
Culture Documents
MCA 1 ST SEMESTER - 2022 Digital Electronics and Computer Orgainzation (MCA542) Assignment Name:-Shubham Babu Roll No:-37
MCA 1 ST SEMESTER - 2022 Digital Electronics and Computer Orgainzation (MCA542) Assignment Name:-Shubham Babu Roll No:-37
Output Screenshort
Q2- Write a shell script to read three numbers using command line arguments and print the largest
number. If you don’t input any number or more than three numbers, then display an error message
to execute the script correctly.
Solution:-
Output Screenshort
Q3- Write a shell script to read a number using command line and reverse it. If you
don’t input any number or more than one numbers, then display an error message to
execute the script correctly.
Solution:-
Output Screenshort
Q4- Write a shell script to read a positive number and count total number of digits. In
case of negative number is given as input, display print error message.
Solution:-
Output Screenshort
Q5- Write a shell script to read a file and change the read and write permission of the
file to read, write and execute permission for all.
Solution:-
Output Screenshort
Q6- Write a shell script to read a number and check whether it is Prime Number or
not.
Solution:-
Output Screenshort
Q7- Write a shell script to read a three digit number and check whether it is
Armstrong Number or not.
Solution:-
Output Screenshort
Q8- Write a shell script to input basic salary of an employee and calculate gross
salary according to given conditions.
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary is between 10001 to 20000 : HRA = 25%, DA = 90%
Basic Salary >= 20001 : HRA = 30%, DA = 95%
Solution:-
Output Screenshort
Q9- Write a shell script to read a number and check whether it is palindrome number
or not.
Solution:-
Output Screenshort
Q10- Write a shell script to print value of power of a number. Read base and
exponent from user.
Solution:-
Output Screenshort