0

Give int x - set of values

Hi! I am trying to attempt the ā€œpronic numbersā€ challenge with c++ and I am wondering if it is possible to assign a range of values to ā€œint xā€ So that it would be ā€œall positive numbers between 0-1000ā€ Is it possible? Is this the right way? Thank you for your guidance ^_^

3rd Mar 2018, 8:57 AM
Word Fisher
Word Fisher - avatar
4 Answers
+ 1
This is possible with a small mutation, but inefficient. I have also written a solution to this problem if you want to have a look. https://code.sololearn.com/ckahljs60e8z/?ref=app
3rd Mar 2018, 9:09 AM
Timon PaƟlick
+ 1
https://code.sololearn.com/cE0kOPQVES9a/?ref=app This is what I have tried so far ^_^ Will comment here if I get any more headway in the meanwhile :)
3rd Mar 2018, 8:58 AM
Word Fisher
Word Fisher - avatar
+ 1
@Timon! Wah! Thank you for sharing! I realize that I have lots to learn xD
3rd Mar 2018, 9:32 AM
Word Fisher
Word Fisher - avatar
+ 1
Yes, C++ can be intimidating, I needed a year of learning to write this. But don't give up, who knows what you write in a year? Btw I just updated the code because there was a bug. It wouldn't have compiled in every environment.
3rd Mar 2018, 9:54 AM
Timon PaƟlick