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 is mena by object block any what is the use of that

2199


What is difference between Heap and Stack Memory?

1029


Can a abstract class be defined without any abstract methods?

978


What is java util concurrentmodificationexception?

899


How do you check if a number is a perfect square?

982


Can you explain the usages of class.forname()?

1053


Can I learn java without any programming experience?

1022


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

937


Why spring singleton is not thread safe?

984


What is the difference between throw and throws in java?

1077


Is vector thread safe in java?

1029


Can an interface extend another interface?

1042


What is compiler and what its output.

1129


What are examples of modifiers?

1087


What is jdbc api?

991