mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Text fix.
This commit is contained in:
parent
2d6ed6d083
commit
1863a5de87
@ -121,8 +121,8 @@ int i1 = 1, i2 = 2; // Shorthand for multiple declarations
|
||||
|
||||
// Arithmetic is straightforward
|
||||
System.out.println("1+2 = "+(i1 + i2)); // => 3
|
||||
System.out.println("1-2 = "+(i2 - i1)); // => 1
|
||||
System.out.println("1*2 = "+(i2 * i1)); // => 2
|
||||
System.out.println("2-1 = "+(i2 - i1)); // => 1
|
||||
System.out.println("2*1 = "+(i2 * i1)); // => 2
|
||||
System.out.println("1/2 = "+(i1 / i2)); // => 0 (0.5, but truncated towards 0)
|
||||
|
||||
// Modulo
|
||||
|
Loading…
Reference in New Issue
Block a user