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
Which field is used in c++?
Will c++ be replaced?
What are the characteristics of friend functions?
When do we run a shell in the unix system?
Why would you use pointers in c++?
Write a program to find the reverse Fibonacci series starting from N.
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
When is the copy constructor called?
Do class declarations end with a semicolon? Do class method definitions?
What is atoi in c++?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Define friend function.
What is name hiding in c++?
What is pure virtual function?
What is constant in c++ with example?