0
Module
How to do modulo function
4 Answers
+ 1
A module is a file written in a programming language in which its functionality can be imported to another file.
+ 1
"%" is the modulo operator.
(In Python, Javascript and Java atleast)
exemple python:
x = 12
x = x % 3
print(x)
output:
0
exemple java:
int x = 13
x = x % 3
System.out.println(x)
output:
1
exemple javascript:
var x = 14
x = x % 3
console.log(x)
output:
2
It's the remainder of a division.
12 / 5 = 2 R: 2
-> 12 % 5 = 2
+ 1
what is this var in middle
0
tq bro