File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ Gui stuff
109109 - [ AI] ( ./prelude/ai.md )
110110 - [ Java] ( ./prelude/java.md )
111111
112+ <!--
112113# The Computing Environment
113114
114115- [Hardware](./hardware.md)
@@ -123,6 +124,7 @@ Gui stuff
123124 - [Game Consoles](./operating_systems/game_consoles.md)
124125 - [Abstractions](./operating_systems/abstractions.md)
125126 - [Defaults](./operating_systems/defaults.md)
127+ -->
126128
127129# Modern Java
128130
@@ -144,7 +146,6 @@ Gui stuff
144146 - [ Creating Files] ( ./the_terminal/creating_files.md )
145147 - [ Run Java Programs] ( ./the_terminal/run_java_programs.md )
146148 - [ Getting Used to it] ( ./the_terminal/getting_used_to_it.md )
147- - [ Challenges] ( ./the_terminal/challenges.md )
148149
149150
150151<!-- - [Getting Started](./getting_started.md) -->
Original file line number Diff line number Diff line change 33To get the remainder of the division between two integers you can use the ` % ` operator.
44This is called the "modulo operator."
55
6+ With ` int ` s ` 7 / 2 ` will give you ` 3 ` . That ` 3 ` is the "quotient" from the division
7+ and is the number of times ` 2 ` can be taken out of ` 7 ` . This leaves a "remainder" of ` 1 ` .
8+
9+ The modulo operator gives you that remainder.
10+
611``` java
712~ void main() {
813int x = 5 ;
9- // The remainder of 5 / 2 is 1
14+ // 5 / 2 is 2 with a remainder of 1
1015// y will be 1
1116int y = x % 2 ;
12- // The remainder of 5 / 3 is 2
17+ // 5 / 3 is 1 with a remainder of 2
1318// z will be 2
1419int z = x % 3 ;
1520
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ comfortable using the terminal for things.
55
66Thats normal. You'll get there eventually. Just know that at least some familiarity with the terminal is going to be needed.
77
8- We'll get back to it relatively soon , but feel free to seek out some bash/terminal specific resources online in the meantime.
8+ We'll get back to it eventually , but feel free to seek out some bash/terminal specific resources online in the meantime.
You can’t perform that action at this time.
0 commit comments