+ 25

# [🏆 Challenge 🏆]: Pronic Numbers 🎮⚠💡🏆🔢

A pronic number is a number which is the product of 2 consecutive integers. Write a code to check if the inputted number is pronic or not an also print those 2 consecutive integers if the number is pronic Note - 0 is also a pronic number Eg- Input -> 12 Output -> 12 is pronic as 12=3*4 You can see my code too- https://code.sololearn.com/cVKRMRBDtKxD/?ref=app

18th Oct 2017, 5:13 AM
Swapnil Srivastava
+ 25
my code is modified ... try it now ☺👍 //upgraded to show solution using loops and quadratic both ☺ ⬜🌹🌹🌹🌹🌹⬜ 🌹⬜⬜⬜⬜⬜⬜ 🌹⬜⬜⬜⬜⬜⬜ 🌹⬜⬜⬜🌹🌹🌹 🌹⬜⬜⬜⬜⬜🌹 🌹⬜⬜⬜⬜⬜🌹 ⬜🌹🌹🌹🌹🌹⬜ https://code.sololearn.com/cZYWW7NrE6Y3/?ref=app
18th Oct 2017, 9:25 AM
Gaurav Agrawal
+ 23
https://code.sololearn.com/cdm8Jcu28T3m/?ref=app
22nd Feb 2018, 7:41 AM
Danijel Ivanović
22nd Feb 2018, 7:03 AM
Danijel Ivanović
+ 16
https://code.sololearn.com/cB6IfkFI0Uho/?ref=app
18th Oct 2017, 7:24 PM
Vukan
22nd Feb 2018, 9:14 AM
MeanMachine
18th Oct 2017, 6:17 AM
noobcøder
+ 14
Here's my C# implementation! ✌ I'm inclined for Maths related challenge and this is really interesting. Special thanks to Oma Falk for the insight! Enjoy~ ❤ https://code.sololearn.com/c9139Lvylj22/?ref=app
18th Oct 2017, 11:58 AM
Zephyr Koo
18th Oct 2017, 7:55 AM
Edward Fish
18th Oct 2017, 8:25 AM
David Akhihiero
+ 12
7th Nov 2017, 6:17 PM
AZTECCO
+ 11
heja I found a very simple solution 😉😉 https://code.sololearn.com/c8Zv37VrY5NV/?ref=app
18th Oct 2017, 8:59 AM
Oma Falk
+ 10
https://code.sololearn.com/c6LzV20tL4KU/?ref=app
19th Oct 2017, 2:27 PM
The Mir-acle
+ 9
@Swapnil: Mine updated to include zero ;)
18th Oct 2017, 7:35 AM
noobcøder
+ 8
I had told that 0 was also a pronic number. But many codes don't output that. Otherwise all nice codes.
18th Oct 2017, 7:29 AM
Swapnil Srivastava
+ 8
@Oma Falk Basically it's a nice trick of completing the square for the expression n(n + 1). 😉
18th Oct 2017, 3:18 PM
Zephyr Koo
+ 8
a further simple pronic tester (-: https://code.sololearn.com/cMTTl39AO1g7/?ref=app
18th Oct 2017, 6:09 PM
Oma Falk
+ 7
@VcC your code is fast but it is neither user friendly nor does it show which 2 integers make it pronic. Otherwise good code. EDIT: Now no problems with the code.
18th Oct 2017, 7:27 AM
Swapnil Srivastava
18th Oct 2017, 8:56 AM
LukArToDo
18th Oct 2017, 11:49 AM
Infinity
+ 7
https://code.sololearn.com/cRcur9eLc83l/?ref=app
21st Oct 2017, 11:43 AM
Ayush Agarwal