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.
Answers were Sorted based on User's Feedback
Answer / amty
Get the sum of numbers
total = n*(n+1)/2
Subtract all the numbers from sum and
you will get the missing number.
Is This Answer Correct ? | 41 Yes | 2 No |
Answer / 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 |
What are friend classes?
Which software is best for programming?
difference between the c++ and c languages
What is difference between class and function?
What are the classes in c++?
Specify some guidelines that should be followed while overloading operators?
What is the use of data hiding?
What is a built-in function?
What is ios flag in c++?
Can constructor be private in c++?
what is polymorphism?
What is difference between malloc()/free() and new/delete?