-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCurse.cpp
More file actions
160 lines (84 loc) · 2.2 KB
/
Curse.cpp
File metadata and controls
160 lines (84 loc) · 2.2 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/* Var and data type of c++
int = 2-4 bytes(entire number values)
float = 4 bytes(decimals numbers)
double = 4 bytes(a decimal var type with the double of space)
char = 1 byte(text)
bool = 1 byte(bolean)
void = 0 bytes(void)
*/
/*CAP 1
// int main(){
// int inputNumberUno,inputNumberDos,Resulta;
// cout << "Dame el primer numero de tu suma" << endl;
// cin >> inputNumberUno;
// cout << "Dame el segundo numero de tu suma" << endl;
// cin >> inputNumberDos;
// Resulta = inputNumberDos + inputNumberUno;
// cout << "la suma es: " << Resulta;
// return 0;
// } */
/* CAP 2 CONDITIONALS
int main(){
int number = -48;
if(number > 0){
cout << "Number is positive" << endl;
} else if(number = 0) {
cout << "NUmber is equal " << 0 << endl;
}
else{
cout << "number is negative" <<endl;
};
}*/
/* CAP 3 LOOPS
int main(){
for (int i = 1; i >= 14; i++ ){
cout << i << endl;
};
return 0;}
*/
/*int main(){
/*CAP 5 DO WHILE
//Calculate the amount of digits of any number using do while, and taking in count the neg and pos numbers
int i = 0,dig;
cout << "give me a digit" << endl;
do{
dig = dig/10;
i++;
}while(dig != 0);
cout << "Your digit amout its: " <<i << endl;
}*/
/* CAP 6 SWITCH
// We will make a little calculator
char op;
int n1,n2;
cout << "Give me your op type" << endl;
cin >> op;
cout << "Give me two numbers" << endl;
cin >> n1 >> n2;
switch (op)
{
case '+':
cout << "Your sum is equal to: " << n1 + n2;
break;
case '-':
cout << "Your rest is equal to: " << n1 - n2;
break;
case '/':
cout << "Your division is equal to: " << n1 / n2;
break;
case '*':
cout << "Your multiplication is equal to: " << n1 * n2;
break;
default:
cout << "Your selected an option that don´t exist";
break;
}*/
/* Cap 7 BREK & CONTINUE: We use this tool in c++ to chage the flow of a loop*/
#include<iostream>
using namespace std;
int main(){
int hectareas = 10000,numHectareas = 0,superficie = hectareas * numHectareas;
if(superficie > 1000000){
}
return 0;
}