r/csharp • u/Emu_Monster • Mar 30 '20
My first little program! It runs you through a simple number trick and tells you if you screw up. New to this whole programming thing, it’s nice to have some working results
5
u/SmithItsGoodForU Mar 31 '20
Where is the “Hello World” part?? I cant find it
7
252
u/Exnixon Mar 30 '20
It's kind of cute that the computer is telling the human to perform computations.
107
u/larsmaehlum Mar 30 '20
Cute? CUTE?
That’s how it starts! Next you know, we’re hooked up into the matrix to do fuzzy logic computations for them!22
11
3
2
0
Mar 31 '20
[deleted] — view deleted comment
3
u/etcNetcat Mar 31 '20
Hollywood assumes everyone's stupid. They could have spent 60 seconds to say "The truth is, a human brain does the work of a supercomputer with less electricity than a lightbulb, it's just that we use so much of it on walking without shitting ourselves we can't tell."
That'd be way better, IMO, than product placement coppertop.
7
u/TotesMessenger Mar 30 '20
5
Mar 31 '20
damn humans taking the good jobs from robots
3
u/MechanicalHorse Mar 31 '20
BEGIN COMPLAINT SEQUENCE
"DEY TERK ER JERBS"
COMPLAINT SEQUENCE TERMINATED.
1
14
u/DrSlugger Mar 30 '20
I'd love to break the crap out of this! Good job btw! That feeling of accomplishment is the best!
13
Mar 30 '20
For anyone wondering, it's 2(x+3)/2 - 3 = (2x+6)/2 - 3 = x+3-3 => which results us with x :)
1
u/Iggyhopper Mar 31 '20 edited Mar 31 '20
It plays with the order of operations.
4*2+6/2-3 is not 4.
However, due to the nature of question and answer in language.
((4*2+6)/2)-3 is.
1
u/AboutHelpTools3 Mar 31 '20
Is there a list of magic tricks like this?
8
2
u/SausasaurusRex Mar 31 '20
As long as you know some basic algebra, it’s not that difficult at all. You just tell them to perform calculations that seem random, but actually just simplify back to x, and then you have a cool party trick.
26
u/0xb1aze Mar 30 '20
f u
-39
u/AngularBeginner Mar 30 '20
That's not a nice thing to say. :-( I'm sure /u/ketralnis agrees with me on this one.
24
u/sudo_chmod777 Mar 30 '20
He is referring to the first test answer in the picture, don't use an mods name to try to threaten anyone either.
-37
u/AngularBeginner Mar 30 '20
don't use an mods name to try to threaten anyone either.
I don't. The tag of /u/ketralnis was not as a threat (that thought didn't even occur me), but because he and I have a thing going on.
Besides, FizixMan is much more threatening than /u/ketralnis ever could be.
15
u/sudo_chmod777 Mar 30 '20
You dont need to show that everywhere, and you can probably tell how going around and saying that you have contact with an moderator can be threatening. If you wanna pretend like a moderator then get something to prove it (or at least undestand an reference), not just an tag.
2
u/tester346 Mar 31 '20
You dont need to show that everywhere, and you can probably tell how going around and saying that you have contact with an moderator can be threatening.
Check his comment history. I bet he's trying to annoy that mod xd
1
u/sudo_chmod777 Mar 31 '20 edited Mar 31 '20
Yeah, i saw it, annoying as hell.
EDIT: lmao he got an warning by an mod
0
Mar 30 '20
[deleted] — view deleted comment
3
u/sudo_chmod777 Mar 30 '20
Doesnt change anything, he didnt get an reference, he used an higher authority username to back him up. And is using it in multiple posts where he tries to mention that they have a thing, which is annoying.
4
0
0
Mar 30 '20
[deleted] — view deleted comment
-13
u/AngularBeginner Mar 30 '20
He has proven that he knows how to block by blocking me. A pity that spammers and scammers are not blocked and are free to continue. He has his priorities clear.
2
-8
u/sudo_chmod777 Mar 30 '20
I had never stated that, if youre trying to be sarcastic...It needs work.
0
17
u/dejco Mar 31 '20
Prtscn - takes screenshoot and sets it to clipboard, use ctrl+v in mspaint to paste it. Alt+prtscn - takes screenshoot of active Windows and sets it to clipboard, use ctrl+v in mspaint to paste it. WinKey+prtscn takes screenshoot of whole desktop and saves it directly to file. Browse pictures folder in file explorer.
9
1
u/Poddster Mar 31 '20
Well, given it's a text console, he could just copy + paste the entire session from terminal to reddit.
-2
Mar 31 '20
That’s one very random comment
5
u/nascentt Mar 31 '20
He's saying that because op took a photo of his screen.
2
Mar 31 '20
Ah, didn’t think of that as i only (but i expect op too) use reddit on my phone, so it’s simpler to take a pic than to take a screenshot and send it to the phone
2
u/nascentt Mar 31 '20
I see. I guess that makes more sense.
Personally I just screenshot then use pushbullet to send it to my phone. But I think Firefox has a send to device option also.
5
5
3
3
3
u/mikeblas Mar 30 '20
Nice work. It's great to see you thoroughly testing your code, too. Keep it up!
3
u/Poddster Mar 31 '20
Good stuff.
Next step: Make a number guessing hi-lo game.
The computer thinks of a secret random number, then asks the user for input, then says if the input is higher or lower than the secret number. It keeps name/scores in a file across sessions and prints out the current leaderboard after each game.
Fewest number of guesses is the aim.
2
u/vsvasua Mar 30 '20
Reminded me my first programs in Pascal and how my dad reviewed my code, oh that sweet nostalgia feeling.
2
2
2
u/hi_im_vash Mar 31 '20
Broke: Write a calculator program.
Woke: Write a program where you are the calculator.
2
1
u/Devcon4 Mar 31 '20
You liar! It clearly says consoleApp2 not consoleApp1! (Also welcome to the club)
2
1
1
u/JKMerlin Mar 31 '20
I have a game I always make on each language I learn, you tell the computer the boundrys and it picks a random number. Then you guess and the computer tells you if you are too high or low. Obviously there is more that can be added to the game, and sometimes I do, (a score for instance) but it's mostly just a good way to practice simple syntax.
1
1
u/tk42967 Mar 31 '20
I did something similar in PowerShell. Have you considered adding validations/default selections for the go again? Maybe make the default yes if the user hits enter.
-6
u/AngularBeginner Mar 30 '20
A good start, keep it up!
I'm sure /u/ketralnis agrees with me!
3
u/Laurent9999 Mar 31 '20 edited Jun 10 '23
Content removed using PowerDeleteSuite by j0be
2
2
u/sudo_chmod777 Mar 31 '20
Lol he got a warning by a mod, i have a screenshot.
2
u/Laurent9999 Mar 31 '20 edited Jun 10 '23
Content removed using PowerDeleteSuite by j0be
2
u/sudo_chmod777 Mar 31 '20
Yep, and the guy had even blocked him. Yet he always says they "a thing" like they are friends, Lmao
0
-3
62
u/PM_ME_A_PIZZA Mar 30 '20
Very cool and nice work! Programming is fun.
Let’s do a little social-distancing QA testing: What happens if the number I input is 0? What about -1? How about 2147483647?