Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if num=687;
U have to get
num=6+8+7;

Answer Posted / sadikhasan palsaniya

int no=687;
int sum=0;
int temp;

while(no>0)
{
temp = no % 10;
sum += temp;
no = no/10;
}
System.out.println(sum);

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps involved to create a bean?

1160


What data structures are used to perform recursion?

1055


What is the use of 'super' keyword inside a constructor?

976


What is method in research paper?

1137


how many types of Inheritance?

1176


What is skeleton and stub?

1091


who can i handle multiple client in RMI

1900


How many ways can we create singleton class?

973


Tell us something about different types of casting?

947


What is difference between word and integer?

1080


What is the diffrence between inner class and nested class?

1094


How does linkedhashmap work in java?

1027


State the main difference between c++ and java?

1094


Is singleton thread safe in java?

992


Which software is used for java programming?

1028