Does anyone know how to make modular arithmetic with block code?

*too

I wish people at my school would make the effort to learn that stuff…

1 Like

That’s what I feel like in middle school right now. :frowning:
@getrithekd can you just make a simple example - I had around 23 breakthroughs about my secret project but not about this.

1 Like

Well, you’d retrieve the two numbers that you would want to store and I guess store them as variables if they aren’t variables/properties already. Then you would find the quotient of a and b (a/b), and then store the quotient as a variable or continue directly operating on it. Then you’d do the quotient times b and store that as a variable (or continue to directly operate on it) and then find a - p.

The first sentence helped so much! - Thanks @cr1sis !

Uh… looks like that screenshot seems redundant. Perhaps I didn’t understand something, but I don’t think that’s the correct solution. Let me try to give a better method.

Yeah, that solution does not work. I have to go now, so hopefully someone else who actually knows what they’re doing can help you.

It’s a double to int conversion. When converting a decimal to an int, the decimal is truncated.

@getrithekd is the solution I marked wrong?

I’m pretty sure.

Can you make a simple example on GKC @getrithekd ?

I just showed you the example in the screenshot. Here it is again:

image

Here is a simple example:
image

1 Like

Yikes! Sorry! I’m not good with code, haha. Alright, I think I should get out of this conversation now.

@Blackhole927 - Last question - what’s x and y?

what I have to deal with everyday… here and at school

welcome to the party @Dark_Hydra

1 Like

stay on topic, please.

@FusionLord my lord… i don’t understand this, rereading now… :open_mouth:

(just realizing @FusionLord has “lord” in it :open_mouth: (I was being formal on accident))

No need to be so formal

Currently thinking about dead British people

HEY! we don’t say that word on the forums! consider “in spectator mode”

What are you talking about, I never said that!