Write a shell script to print sum of digits of the given number. Get input from user and display the result. In case of negative number is given as input, display "Not a positive number" as output....


Write a shell script to print sum of digits of the given number. Get input from user and display the result. In case of negative number is given as input, display "Not a positive number" as output.



Sample Input 1:


123



Sample Output 1:


Sum of digit for given number is 6



Sample Input 2:


-123



Sample Output 2:


Not a positive number



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here