Get something random without functions [cancelled]
+0
−0
Introduction
Random integer challenges aren't new. They've been here for a while now, yet none exists on Codidact. It's also noted that there are built-in functions that allows you to get random integers, which makes things all the more easier. How about upping the game?
Challenge
- Write a program that takes a random number (choose the range you want, but $-100 < n < 100$ is the minimum.
- You can't use functions on this one. Yes, functions, not built-ins. The only exception here is
main()
if it's necessary. - Built-ins are technically allowed if it's from a golflang. Not so sure on mainstream languages.
- Functions can't be used, mostly on mainstream languages.
- The outputting can be implemented onto the main code, or don't if it's for testing. It's an optional choice.
- Since this is a code-golf challenge, the shortest program in each language wins.
1 comment thread