+ 17

# Quizz time XII "1111"

i have two integer number. power 2 both and substract them the result is 1111. the format is : number1^2 - number2^2 = 1111 Question : what is the result if i substract number1 and number2 ? number1 - number2 = ......

10th Apr 2017, 9:14 AM
Agus Mei
+ 12
56 ^ 2 - 45 ^ 2 = 1111. So, the answer is 56 - 45 = 11.
10th Apr 2017, 9:18 AM
Krishna Teja Yeluripati
+ 18
only 3 minutes Sir. that is super fast.
10th Apr 2017, 9:18 AM
Agus Mei
+ 16
next quizz
10th Apr 2017, 9:20 AM
Agus Mei
10th Apr 2017, 9:36 AM
Agus Mei
+ 12
// for some reason, this code outputs nothing on SoloLearn. It works fine on desktop compiler though. #include <iostream> #include <cmath> int main() { for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { if (((pow(i,2))-(pow(j,2))) == 1111) { std::cout << i - j; } } } return 0; }
10th Apr 2017, 9:27 AM
Hatsy Rei
+ 9
Thanks @Agus.
10th Apr 2017, 9:19 AM
Krishna Teja Yeluripati
+ 8
11
10th Apr 2017, 9:20 AM
Cyrus Ornob Corraya
+ 8
@Dennis : Wow!
10th Apr 2017, 9:26 AM
Krishna Teja Yeluripati
+ 8
I am late but its a code for the question:- https://code.sololearn.com/W1t3qG6X7G8p/?ref=app
10th Apr 2017, 10:18 AM
Nikhil
+ 7
a + b = 101 a - b = 11 (a+b)(a-b)=a^2-b^2=1111 a = 56 b = 45
10th Apr 2017, 9:22 AM
Cyrus Ornob Corraya
+ 7
@Dennis That was so easy. I tried the hard way. silly me. ;P
10th Apr 2017, 9:27 AM
Cyrus Ornob Corraya
+ 6