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

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!

good job, Now back on topic…

(I’m going to bed now)

I can say that somebody is dead on the forums. It’s not inappropriate for kids.

x and y are the numbers you want to use to divide: in this case, this is x mod y.

1 Like

I tried it out and it doesn’t work.

screenshot your code maybe?

image
Here you go

What happens? (what is the result when the code is run)