posted to Share by 540957

Some points of advice:

  1. When converting the string from Console.ReadLine(), don't use Convert.ToDouble. This won't save you from inputs other than numbers. Use Parse() or TryParse() instead.
  2. Keep the indentation the same throughout the program, this makes it easier to read. Your final if statements have something up with their indentation, but otherwise they work fine.
  3. Try setting Number1, Number2 and Calc to static variables. This will remove the need to send them all within a function call. To do this, move them outside of the main void and into the class by itself, and adding a static before the variable type.

Good job otherwise!

My improved calc
posted to Share by Nuuh123

I made a similar project just like this one! I'm not that much better than you, but I might be able to provide some advice:

Thread.Sleep() is sometimes useful to create some sense of functionality but try not to use it repeatedly.

When you save user input, you could try to use Double.TryParse() to detect if the user input is actually a number or not. Currently, when a user enters anything else than a number, the program crashes.
You can find out more about this here:
Or see it in action here:

Also, multiplication functions should just be *, not **.

Hope this helps!

Completely Random Password Generator in 45 Lines
posted to Share by steamsydev

@LiamDonohue it starts to break above around 20k lol go wild

i made a calculator, nothing special
posted to Share by steamsydev

@malvoliothegood done! didn't realize my mistake there, just tried to make this as fast as possible

Maze game
posted to Share by MerlinKnight

0 star 47 seconds

My improved calc
posted to Share by Nuuh123

@Nuuh123 I still haven't figured out potencies... The documentation Microsoft provides is a bit confusing to me.

🐶Introduce yourself! 🐶
posted to Announcements by katyadee

Hey guys! I'm Damian from Illinois. I've always wanted to learn to code, and am making my first steps with C#. I'm only on here because I'm not on my PC at home, but at least I have a reason to skip class.