-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
43 lines (29 loc) · 988 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
namespace Voorbeelden_van_operatoren
{
class Program
{
static void Main(string[] args)
{
int intUitkomst;
intUitkomst= 2 + 3 + 5;
Console.WriteLine(intUitkomst);//output is 10
intUitkomst = 5 - 2;
Console.WriteLine(intUitkomst);//output is 3
intUitkomst = 5 * 3;
Console.WriteLine(intUitkomst);//output is 15
intUitkomst = 10 / 2;
Console.WriteLine(intUitkomst);//output is 5
intUitkomst = 6 % 2;
Console.WriteLine(intUitkomst);//output is 0
intUitkomst = 6 % 4;
Console.WriteLine(intUitkomst);//output is 2 (rest na deling)
intUitkomst = 5;
intUitkomst++;
Console.WriteLine(intUitkomst);//output is 6
intUitkomst = 5;
intUitkomst--;
Console.WriteLine(intUitkomst);//output is 4
}
}
}