Jump to content
Sign in to follow this  
hisoka

find x value in modular equation

Recommended Posts

Hello :)

I put this question in general section as it has something to do  with math :

x modulo 20 = 33 . How to get  the value of x  ?  any help  would be appreciated

Share this post


Link to post
Share on other sites

x modulo 20 should always be a number smaller than 20. Since 33 is greater than 20 that equation is false. I'll be using "%" as a shorthand for modulo since most programming languages do that.

If you ask me how to find a number that satisfies the equation x % 20 = k, I'd go by the definition that the modulo is the remainder of the division. This means that the equation can be rewritten as this: (x - k) / 20 = n, where n is any natural number. Solving for x you would get x = 20 * n + k. There are as many solutions as values of n. Since there are infinite natural numbers there are infinite solutions. Since k cannot possibly have 33 as a value, here are a few solutions for k = 10 instead:

  • 30 % 20 = 10
  • 50 % 20 = 10
  • 70 % 20 = 10
  • 150 % 20 = 10
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×