_Rocket_ 656 / 8,277 Report Post Posted March 24, 2020 Edited March 24, 2020 by _Rocket_ It is time to flex your program'r skilz and count to 10 like you learned in school. I challenge everyone here to create the most complicated "count to 10" program possible. The goal is simple. All you need to do is make your program print numbers 1 through 10 into console OR by using file I/O. You can separate each number using a space or by inputting a new line. HOWEVER, here's the catch. You need to make it as complicated as possible. Each number should take a ridiculous amount of code to print. Now please, don't just spam if else blocks. Try to be creative. More creative "solutions" will be loved more than quick and sloppy ones. Being able to make your code run in a loop would be really cool if you can pull it off. But you have the freedom of choice here. When you make something, please provide the language you used. If you use assembly, don't just copy off a compiler like godbolt. Everything should be original code wirtten by you (besides the printing method or file I/O of course). I'll pitch in a few when I get a chance 😄 You can paste them in a code block here. You also have the choice of GitHub and other platforms if the code gets REALLY complicated. The obvious rule is the code MUST compile/run. Errors are not accepted. And of course if you really want to, you can use a web designing language to print these numbers out onto a localhost page. This is also acceptable. Have fun! And feel free to use a variety of languages! It would be super interesting to see other languages get utilized in this weird challenge haha Edited March 24, 2020 by _Rocket_ I write programs and stuff. If you need to contact me, here is my discord tag: Dustin#6688 I am a busy person. So responses may be delayed. Share this post Link to post Share on other sites More sharing options...
Reverb 273 / 4,902 Report Post Posted March 24, 2020 1 2 3 4 5 7 8 9 10 Share this post Link to post Share on other sites More sharing options... Achievements
Cyber_Spectre 10 / 1,303 Report Post Posted March 24, 2020 Edited March 24, 2020 by Cyber_Spectre - Edit Reason: Put in 10,000,000 and crashed my computer, have fun! ##Crazy.py ####### #Purpose: Count to the number 10 import sys import time def nummy(numbers): #@ return void #Take the binary amount and convert that into decimal -> charcters -> decimalOfCharacter -> hex of ASCII #Convert Hex back into decimal to print #Create an array to store information about our numbers nums = [] # Create this array to show ASCII Chars chars = [] #convert decimal into ASCII chars decimal = int(numbers,2) #Loop from 1 -> n + 1 ie 1-10 for c in range(1, decimal+1): # Have to append to an array to actually show this chars.append(str(chr(c))) #Print the cool ASCII sys.stdout.write("ASCII Chars:" + str(chars) + "\n") # from 1 to (n + 1) convert this from decimal to char to decimal to hex for i in range(1, decimal+1): nums.append(hex(ord(chr(i)))) #Print the final outcome of HEX print("HEX: " + str(nums) + "\n") #Use a 'with' statement, because I sometimes forget to close file # with open("readthis.txt", "w") as f: for i in nums: f.write(i + '\n') #Clear the array to allow for 'new' data #Not really...it's the same crap lol nums.clear() #Make it seem the program is doing something important sys.stdout.write("Doing some important ST0xFF.." + "\n") time.sleep(2) #Open our file and read it as a var of 'f'. #Read every single line and split them up, not have i.e. 0x\0x1\0x2 etc. with open("readthis.txt", "r") as f: x = f.read().splitlines() #Append this to our 'cleared' array nums for i in x: nums.append(i) #Loop through the nums array and convert all of the hex to decimal and show to the user for i in nums: sys.stdout.write(str(int(i,0)) + " " ) #main method def main(): #Give the option to put in however many numbers you want userNum = int(input("Enter number: ")) #call the function nummy and plug in numbers converted to binary sys.stdout.write("Inserting: BINARY -> " + str(bin(userNum)) + "\n") nummy(bin(userNum)) main() Allowed the user enter an arbitrary amount of numbers to the program: Thought this was a great idea @_Rocket_! Thanks. Can't wait to see what others put here. This is no way the most complicated way. I may change it *If someone just does straight up assembly I would be amazed. * #Also I saw no reason to check for non-positive numbers, try it out ^# Edited March 24, 2020 by Cyber_Spectre Put in 10,000,000 and crashed my computer, have fun! - Spectre Share this post Link to post Share on other sites More sharing options...
Snowy 837 / 11,431 Report Post Posted March 28, 2020 Edited March 28, 2020 by Snowy I've definitely outdone myself on this challenge. Using: https://github.com/kelseyhightower/nocode Quote I've managed to create this monstrosity. Build the app using Quote Output: Quote /s Edited March 28, 2020 by Snowy Share this post Link to post Share on other sites More sharing options...
Joshy 4,363 / 44,847 Report Post Posted April 4, 2020 Edited April 5, 2020 by Joshy What did you mean by making it run in a loop? Like have it count 1 through 10 over and over again? #include<stdio.h> int firstNumber = 1, lastNumber = 10; int main() { void counter(int timerStart, int initialCount, int finalCount, int *bucket); void myPrinter(int firstCall, int lastCall, int *locationPoint); int myArray = int("Yes"); counter(-5687, firstNumber, lastNumber, &myArray); myPrinter(firstNumber, lastNumber, &myArray); return int("Joshy"); } int counter(int timerStart, int initialCount, int finalCount, int *bucket) { /* Count top four bits of a 16-bit integer and stores into cell * Cell increments each time a number is stored otherwise keep writing same number into old cell */ *bucket++ = ('J' - 'O' + 'S' + 'H' + 'Y' - 'r' - 'u' - 'l' + 'e' - 's' + '!') & (timerStart++ >> '$'/3 ) == initialCount ? initialCount++ : *--bucket; // Stopping criteria initialCount <= finalCount ? counter(timerStart, initialCount, finalCount, bucket): finalCount; return false; } int myPrinter(int firstCall, int lastCall, int *locationPrint) { // Prints the array printf("%d\t", *(locationPrint++)); firstCall++ < lastCall ? myPrinter(firstCall, lastCall, locationPrint) : int("Does it matter?") ; return true; } Edited April 5, 2020 by Joshy Share this post Link to post Share on other sites More sharing options...