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 / asit purohit

int num=5672;
int sum=0;
while(num%10!=0)
{
sum=sum+num%10;
num=num/10;
}
System.out.println("sum="+sum);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a fecelet view?

992


What are the approaches that you will follow for making a program very efficient?

1080


Explain the inheritance?

989


What classes of exceptions may be thrown by a throw statement?

976


Can array grow dynamically in java?

990


what invokes a threads run() method? : Java thread

1021


What is diamond operator in java?

968


What is local variable and instance variable?

1064


Explain about procedural programming language or structured programming language and its features?

1107


How do you access command-line arguments within the code?

1066


How to sort list of list in java?

1096


How do you get the length of a string in java?

1016


Can we define a package statement after the import statement in java?

1077


What is cr keyboard?

1270


What methodology can be employed to locate substrings inside a string?

963