-
Notifications
You must be signed in to change notification settings - Fork 0
/
BB.cpp
80 lines (76 loc) · 1.74 KB
/
BB.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
70
71
72
73
74
75
76
77
78
79
80
#include <bits/stdc++.h>
#if !defined(True)
#define True (1==1)
#endif
#if !defined(False)
#define False (!True)
#endif
#ifdef _WIN32
#include <fcntl.h>
#endif
int64_t a = 2*(2+3*8/2);
double b = 2.0;
std::wstring andr_s = L"andrés, es, raro";
std::wstring cadena = L"hola";
class pila {
private :
std::deque<int64_t> mi_pila;
int64_t tama_o;
public :
pila ( std::deque<int64_t> entrada ) {
mi_pila = entrada;
}
void push ( int64_t a ) {
mi_pila.push_back(a);
}
};
void mi_imprime ( std::wstring s, int64_t a ) {
std::wcout << s << " " << 2 << " " << andr_s << " " << a << std::endl;
}
int64_t suma ( int64_t a, int64_t b ) {
int64_t c = a+b;
return a+b;
}
int main ( int argc, char const *argv[] ) {
#ifdef _WIN32
_setmode(_fileno(stdout), 0x00020000);
_setmode( _fileno(stdin), 0x00020000 );
#endif
#ifdef linux
std::wcout.sync_with_stdio(false);
std::wcout.imbue(std::locale("en_US.utf8"));
wcin.imbue(std::locale());
#endif
std::wstring nombre = L"hola";
int64_t ca = 2;
if(a > 10 && True){
a = 10;
}else if(a == 20){
a = 21;
}else{
a = 0;
}
while(a < 10){
a+=1;
}
for(int64_t x = 10; x < 100; x += 2){
std::wcout << L"BB es lo máximo" << std::endl;
}
std::deque<int64_t> mi_lista { 1, 2, 3, 4 };
mi_lista.push_back(2);
mi_lista.pop_front();
mi_lista.pop_back();
mi_lista.front();
mi_lista.back();
mi_lista[2];
for(int64_t x = 10; x < mi_lista.size(); x += 2){
std::wcout << L"BB es lo máximo" << std::endl;
}
int64_t sum = suma( 2, a );
mi_imprime( L"mi_funcion", sum );
std::wcout << "ingresa tu nombre y tu edad: ";
int64_t edad;
std::wcin >> nombre >> edad;
std::wcout << L"tu nombre es: " << " " << nombre << " " << L" y tienes: " << " " << edad << " " << L" años" << std::endl;
return ca+2;
}