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

What is the base class of all classes?

1107


Write a program to print the pattern given below

993


Explain about varargs in java?

1185


How do you override a private method in java?

1031


placement papaers of spring computing technology

1456


What are default methods ?

1107


why Interface used?

1033


Difference between collection, collection and collections in java?

1061


Write a program to print count of empty strings in java 8?

1062


What is collection class in java?

1053


How does multithreading take place on a computer with a single cpu in java programming?

1060


How do you declare an empty string?

1112


What is equals method in java?

1105


What is a conditional statement explain with example?

1065


How do you reverse a word in java?

1152