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

Explain hashset and its features?

1078


What is qms certification?

894


What are use cases?

905


Does java vector allow null?

894


How do you sort in java?

938


How is Object Oriented Programming different from Procedure Oriented Programming?

984


What is the use of isempty in java?

962


Is array dynamic in java?

875


Is node a data type in java?

941


How many types of flags are there?

952


Can java cast null?

972


What is the list interface?

1038


How can I debug the Java security exceptions and AccessControlExceptions?

1090


Write an algorithm for quick sort?

964


What are the main features of java?

910