+ 9
Little challenge for beginners: counting
Since allot of the challenges people post are sometimes quite difficult, I made a challenge beginners who just started can make. CHALLENGE: Write a code wich has a output counting from 1 to a number you can enter yourself and let it count back to 1. I did it in C++ (see added code), would like to see how it is done in different languages or different from how I did it. Good luck! https://code.sololearn.com/cG4Q2t374jOa/?ref=app
9 Answers
+ 16
One-linear with Python
https://code.sololearn.com/cv6mg0B5BmSc/?ref=app
+ 15
Using inline assembly:
https://code.sololearn.com/c7g9oi9i7rIN/?ref=app
+ 10
So I saw that Kotlin and C# were missing so I added them😉😆
(second Kotlin code has no loops)
https://code.sololearn.com/cuEScmQXjaYa/?ref=app
https://code.sololearn.com/cEsvKJFcu53B/?ref=app
https://code.sololearn.com/cRy8rQK7nkNU/?ref=app
+ 9
+ 8
my trails......soon i will update with more efffecient algorithm...
https://code.sololearn.com/cqwK61KKYD2N/?ref=app
+ 6
https://code.sololearn.com/ceTtCug4VJ4C/?ref=app
+ 4
One liner I hope.
https://code.sololearn.com/cCn8MyHOV9fU/?ref=app
+ 1
https://code.sololearn.com/c8dL1FVM1DpZ/?ref=app
I find it interesting to look at how people solve this sort of thing :)