Quizz time XII "1111" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
Agus Mei - avatar
13 Answers
+ 12
56 ^ 2 - 45 ^ 2 = 1111. So, the answer is 56 - 45 = 11.
10th Apr 2017, 9:18 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 18
only 3 minutes Sir. that is super fast.
10th Apr 2017, 9:18 AM
Agus Mei
Agus Mei - avatar
+ 16
next quizz
10th Apr 2017, 9:20 AM
Agus Mei
Agus Mei - avatar
10th Apr 2017, 9:36 AM
Agus Mei
Agus Mei - avatar
+ 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
Hatsy Rei - avatar
+ 9
Thanks @Agus.
10th Apr 2017, 9:19 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 8
11
10th Apr 2017, 9:20 AM
Cyrus Ornob Corraya
Cyrus Ornob Corraya - avatar
+ 8
@Dennis : Wow!
10th Apr 2017, 9:26 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 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
Nikhil - avatar
+ 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
Cyrus Ornob Corraya - avatar
+ 7
@Dennis That was so easy. I tried the hard way. silly me. ;P
10th Apr 2017, 9:27 AM
Cyrus Ornob Corraya
Cyrus Ornob Corraya - avatar
+ 6
ready for next one. ;)
10th Apr 2017, 9:24 AM
Cyrus Ornob Corraya
Cyrus Ornob Corraya - avatar
+ 6
4^2 - 1^2 = 1111 in binary 4 - 1 = 11 in binary
10th Apr 2017, 9:25 AM
Dennis
Dennis - avatar