Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
W.A.S.S to print the count and sum of digits of a given number.
Program
# W.A.S.S to print the count and sum of digits of a given number.
echo "Enter the Number:"
read num
temp=0
sum=0
cnt=0
while test $num -gt 0
do
temp=`expr $num % 10` #extract the digit from nuber
sum=`expr $sum + $temp` #add the digit into sum
num=`expr $num / 10` #reduce no by dividing the no by 10
cnt=`expr $cnt + 1` #conter to count the no of digit
done
echo "Total No of digit in the give no is $cnt"
echo "Sum of digit:$sum"
Output
Enter the Number:
786
Total No of digit in the give no is 3
Sum of digit:21
Provide Example of Function? An illustration of a function definition main() { message(); } /* header */ message() { /*bodystarts here*/ printf ("Example for function
The classical connect-4 game is played on a 67 board, it can in fact be played in any nrRowsnrCols board. In your implementation, the user will specify the number of rows nrRows an
On December 27, 2011, Seymour Gravel, at the urging of his wife, Mary Walford, has brought you his preliminary figures for his business. Seymour carries on a business writing and e
Software and sales assingment I keep get a syntax error
Problem 1 Define the architecture of UNIX operating system with appropriate diagram Problem 2 Define the term inter-process communication. What are several approaches t
Is there one can help me in the language Lisp and Prolog
The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of t
Write a function lastfirst() that takes a list of strings as a parameter. Each string in the list has the format ''Last, First'' where Last is a last name and First is a first nam
I have 9 assignments to be completed
In this question we will dene a function for sorting lists based upon the algorithm selection sort. First, dene a function smallest which takes as input a list of integers and r
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd