-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0028.cpp
More file actions
34 lines (25 loc) · 739 Bytes
/
0028.cpp
File metadata and controls
34 lines (25 loc) · 739 Bytes
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
#include <iostream>
#include <stdlib.h>
/*====================================
* eXcript.com
* fb.com/eXcript
* ====================================*/
using namespace std;
int main() {
//Incremento = ++
//Decremento = --
cout << "Operador de incremento" << endl;
int i = 0, i2 = 0;
cout << "Pre = " << ++i << endl;//pre-incrementar
cout << "Pos = " << i2++ << endl;//pos-incrementar
cout << "Pos = " << i2 << endl;
cout << endl;
cout << "Operador de decremento" << endl;
i = 0;
i2 = 0;
cout << "Pre = " << --i << endl;//pre-decrementar
cout << "Pos = " << i2-- << endl;//pos-decrementar
cout << "Pos = " << i2 << endl;
system("pause");
return 0;
}