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...

There is a array of 99 cells and we have to enter 1-100
elements in it , no two elements would repeat , so the is one
no. missing because 99 cells and 1-100 nos. so we had to
implement a function to find that missing no.

Answer Posted / shiva sahu

Get the sum of numbers
total = n*(n+1)/2

Subtract all the numbers from sum and
you will get the missing number.

this is not mine,but this ans is right

Is This Answer Correct ?    22 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does a derived class inherit or doesn't inherit?

1052


What is pointer in c++ with example?

1033


What are advantages of c++?

977


Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes

1044


Is the declaration of a class its interface or its implementation?

1137


How to give an alternate name to a namespace?

1056


Which one is a preferred language C or C++? Why?

1037


What is ostream in c++?

970


Which coding certification is best?

982


What is the best way to take screenshots of a window with c++ in windows?

1014


What are the two types of comments, and how do they differ?

1069


What is function declaration in c++ with example?

1027


Out of fgets() and gets() which function is safe to use and why?

1155


What is data abstraction? How is it different from data encapsulation?

956


To what does “event-driven” refer?

1015