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
Extensive programming platform .NET It is a new, simple, and comprehensive selection foundation. It is not a selection terminology, but it can handle several selection dialects.
Develop a socket program in UNIX/Linux that uses (i) TCP as the transport protocol and (ii) UDP as the transport protocol for transferring a short message between a client and s
Please choose the best tutor to rewrite my assignment Ticket ID # EM201713THA711DSTN.because insructor does not accept. Thank you
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Introduction Each module of the course includes a programming project. However, for Modules 5 and 6 we will do a single project to cover both. The purpose of the programming p
What is an algorithm? What are the characteristics of a good algorithm? An algorithm is defined as “a step-by-step procedure of accomplishing some task'''' An algorithm may be sh
System.in and System.out should not be used anywhere in the programs except in main and only for testing purposes. All calculations should be done in a method. Note: To use J
1. Write a program that figures out how long it will take to pay off a credit card by making payments of $10 each month. Take care to avoid infinite loops. (How would a bank preven
A specification of a function TOARR is given below. function TOARR(n in Int, s in Stack of Int) return in Array of Int pre n ≥ 0. post The returned value is an array of size
Using OOP,write a sample program to get the factorial of a number entered by a user
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