-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathint.cpp
69 lines (50 loc) · 1.88 KB
/
int.cpp
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
#include <iostream>
using std::cout ;
int main(){
signed short int number1 ;
signed int number2 ;
signed long int number3 ;
signed long long int number4 ;
unsigned short int number5 ;
unsigned int number6 ;
unsigned long int number7 ;
unsigned long long int number8 ;
cout << std::endl << "Signed " << std::endl << "---------" << std::endl ;
cout << "short -> " ;
cout << "size:" << sizeof(short) << "Bytes " ;
cout << "Min:" << SHRT_MIN << " " ;
cout << " Max:" << SHRT_MAX ;
cout << std::endl ;
cout << "int -> " ;
cout << "size:" << sizeof(int) << "Bytes " ;
cout << "Min:" << INT_MIN << " " ;
cout << " Max:" << INT_MAX ;
cout << std::endl ;
cout << "long -> " ;
cout << "size:" << sizeof(long) << "Bytes " ;
cout << "Min:" << LONG_MIN << " " ;
cout << " Max:" << LONG_MAX ;
cout << std::endl ;
cout << "long long -> " ;
cout << "size:" << sizeof(long long) << "Bytes " ;
cout << "Min:" << LONG_LONG_MIN << " " ;
cout << "Max:" << LONG_LONG_MAX << " " ;
cout << std::endl ;
cout << std::endl << "Unsigned " << std::endl << "---------" << std::endl ;
cout << "unsigned short -> " ;
cout << "size:" << sizeof(unsigned short) << "Bytes " ;
cout << "Max:" << USHRT_MAX ;
cout << std::endl ;
cout << "unsigned int -> " ;
cout << "size:" << sizeof(unsigned int) << "Bytes " ;
cout << "Max:" << UINT_MAX ;
cout << std::endl ;
cout << "unsigned long -> " ;
cout << "size:" << sizeof(unsigned long) << "Bytes " ;
cout << "Max:" << ULONG_MAX ;
cout << std::endl ;
cout << "unsigned long long -> " ;
cout << "size:" << sizeof(unsigned long long) << "Bytes " ;
cout << "Max:" << ULONG_LONG_MAX ;
cout << std::endl ;
}