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
Applications of OOP, The promising areas for application of OOP include: Real-time systems Simulation and modelling Object-oriented databases Hypertext, hype
Figure is a representation of the solar system. In a basic model of the same concentric orbits planets rotate around the sun. The closer the Planet in less time Sun completes a ful
Explain the Goto Statement - Computer Programming? The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part o
Class a Abstract Data Type: is a template for creating objects. A class describes a collection of related objects i.e. instances of the classes. Basically classes are user-defined
Objective: to show if the sizes of the clusters influence the communication cost among a set on nodes Write a K-Means program for a set of M points randomly distributed on an
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
Most popular news websites publish their RSS ( Really Simple Syndication ) feeds. If you haven 't heard of RSS, you may have a look at this article on Wikipedia. In this assignm
Hi how can I upload my hw to you experts?
An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in bu
How to do socket programming in C
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