✅ How do i print the number difference between 2 numbers like i have 4 and 5
and i want it to say a difference of 1 ya know
5 Replies
Well, you can use
- to subtract one from the other
Then use Console.WriteLine() to print the resultAnd if you want it to be only positive numbers you could also use Math.Abs() to get the absolute value
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
I'm just guessing here but maybe you're not talking about the code so much as the environment setup? I know that can be kind of frustrating at first. If you want to just be able to run your code on your local machine, open a PowerShell terminal and enter the following commands:
Hope that helps. Or.... you could always just use an online compiler like https://dotnetfiddle.net or one of many others. Just google for "online C# compiler" and a bunch will pop up.
Good luck.