Skip to main content

All Questions

Tagged with
5 votes
4 answers
4k views

Dividing two numbers then handle the divide by zero exception with try/catch

I am new to coding, I hope you can help me to improve my code :) First of all: The code works correctly. ...
jasmine's user avatar
  • 53
6 votes
1 answer
747 views

C# random math questions project

I made a C# console math project where the user answers addition, subtraction, multiplication, division, power or square-root questions based on the difficulty they choose! However, I am struggling ...
qqqqqkks's user avatar
  • 161
2 votes
2 answers
463 views

C# maths quiz with user choosen difficulty-level

I have built a maths project that asks the user an addition, subtraction, multiplication, division, power and square root questions based on the difficulty level they choose! But I am trying to ...
qqqqqkks's user avatar
  • 161
4 votes
1 answer
524 views

Solving a linear system with two variables

Background: Equation 1: 2x-y=6 Equation 2: 4x+3y=22 Because 1 is ax-by=c and 2 is dx-ey=f y=(a * f - c * d) / (a * e - b * d) and x is simply (c - (b * y)) / a) What I am trying to do: ...
kizzer's user avatar
  • 41
3 votes
5 answers
2k views

Absolute Values and Fractions

$$ \frac{|x|-|y|}{1+|xy|} $$ How can I reduce the amount of code without losing quality? What are your tips? Your comments on the structure, logic, in general, everything. How to make the type of ...
Aleksey Nikolaev's user avatar
3 votes
1 answer
5k views

Probability Chance

I'm creating a game and I need some properties to work as percent chance to hit/dodge. I implemented a small testing program that takes percent chance and the amount of hitting attempts as input and ...
Denis's user avatar
  • 8,508