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 / 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 |
Post New Answer View All Answers
What is the use of function pointer?
What are c++ files?
What is class syntax c++?
Which function cannot be overloaded c++?
Give example of a pure virtual function in c++?
Who calls main function?
What are references in c++?
Is rust better than c++?
Who made c++?
Define namespace in c++?
What is string in c++ programming?
Define copy constructor.
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
Why is c++ awesome?
Which software is best for coding?