-
Notifications
You must be signed in to change notification settings - Fork 0
/
Data-types.cs
74 lines (62 loc) · 2.64 KB
/
Data-types.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections;
using System.Collections.Generic;
namespace BTKAkademi
{
public class Program
{
static void Main(string[] args)
{
//8-bit integer
Console.WriteLine(nameof(SByte));
Console.WriteLine($"Alt limit : {SByte.MinValue,20}");
Console.WriteLine($"Üst limit : {SByte.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(SByte),20}");
Console.WriteLine();
Console.ReadKey();
//Unsigned 8-bit integer
Console.WriteLine(nameof(Byte));
Console.WriteLine($"Alt limit : {Byte.MinValue,20}");
Console.WriteLine($"Üst limit : {Byte.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(Byte),20}");
Console.WriteLine();
Console.ReadKey();
//16-bit integer
Console.WriteLine(nameof(Int16));
Console.WriteLine($"Alt limit : {Int16.MinValue,20}");
Console.WriteLine($"Üst limit : {Int16.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(Int16),20}");
Console.WriteLine();
Console.ReadKey();
//Unsigned 16-bit integer
Console.WriteLine(nameof(UInt16));
Console.WriteLine($"Alt limit : {UInt16.MinValue,20}");
Console.WriteLine($"Üst limit : {UInt16.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(UInt16),20}");
Console.WriteLine();
Console.ReadKey();
//32-bit integer
Console.WriteLine(nameof(Int32));
Console.WriteLine($"Alt limit : {Int32.MinValue,20}");
Console.WriteLine($"Üst limit : {Int32.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(Int32),20}");
Console.WriteLine();
Console.ReadKey();
//Unsigned 32-bit integer
Console.WriteLine(nameof(UInt32));
Console.WriteLine($"Alt limit : {UInt32.MinValue,20}");
Console.WriteLine($"Üst limit : {UInt32.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(UInt32),20}");
Console.WriteLine();
Console.ReadKey();
//Double
Console.WriteLine(nameof(Double));
Console.WriteLine($"Alt limit : {Double.MinValue,20}");
Console.WriteLine($"Üst limit : {Double.MaxValue,20}");
Console.WriteLine($"Boyut : {sizeof(Double),20}");
Console.WriteLine();
Console.ReadKey();
Console.ReadKey();
}
}
}