mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-06 06:43:47 +00:00
Initial commit
This commit is contained in:
parent
ca7684985d
commit
49bdd4dda1
60 changed files with 1527 additions and 30 deletions
20
vscode/Chapter03/Operators/Program.cs
Normal file
20
vscode/Chapter03/Operators/Program.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
int a = 3;
|
||||
int b = a++;
|
||||
WriteLine($"a is {a}, b is {b}");
|
||||
|
||||
int c = 3;
|
||||
int d = ++c; // increment c before assigning it
|
||||
WriteLine($"c is {c}, d is {d}");
|
||||
|
||||
int e = 11;
|
||||
int f = 3;
|
||||
WriteLine($"e is {e}, f is {f}");
|
||||
WriteLine($"e + f = {e + f}");
|
||||
WriteLine($"e - f = {e - f}");
|
||||
WriteLine($"e * f = {e * f}");
|
||||
WriteLine($"e / f = {e / f}");
|
||||
WriteLine($"e % f = {e % f}");
|
||||
|
||||
double g = 11.0;
|
||||
WriteLine($"g is {g:N1}, f is {f}");
|
||||
WriteLine($"g / f = {g / f}");
|
||||
Loading…
Add table
Add a link
Reference in a new issue