show that among any group of five (not necessary consecutive
) integers, there are two with the same remainder when
divided by 4.
Answer / lalala
generalized pigeon principle: If N objects are placed into k
boxes, then there is at least one box containing at least (ceiling) N/k objects.
let k = 4 ;
find N:
N/4 = 2 , N= 5, in order to get the answer 2..
Is This Answer Correct ? | 17 Yes | 19 No |
Write a program to get the value of sin (x) using a library function , when x is given in degrees.
what are Operators and explain with an example?
How do I use turbo c++?
What is late binding c++?
Explain what are the sizes and ranges of the basic c++ data types?
What is a c++ class?
What is scope in c++ with example?
Which one of the following describes characteristics of "protected" inheritance? a) The base class has access only to the public or protected members of the derived class. b) The derived class has non-public, inheritable, access to all but the private members of the base class. c) The derived class has access to all members of the base class. d) The private members of the base class are visible within the derived class. e) Public members of the derived class are privately accessible from the base class.
Which field is used in c++?
int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?
What is increment operator in c++?
What are Virtual Functions? How to implement virtual functions in "C" ?