-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmayor_menor.cpp
More file actions
50 lines (36 loc) · 850 Bytes
/
mayor_menor.cpp
File metadata and controls
50 lines (36 loc) · 850 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int mayor(int n1, int n2);
int menor(int n1, int n2);
int mayor(int n1, int n2, int n3);
int menor(int n1, int n2, int n3);
int main() {
int a;
int b;
int c;
cout << "Introduzca dos numeros enteros ";
cin >> a >> b;
cout << "El mayor de los numeros introducidos es " << mayor(a, b) << endl;
/*
cout << " el menor es " << menor(a, b) << endl;
cout << "Introduzca tres numeros enteros ";
cin >> a >> b >> c;
cout << "El mayor de los numeros introducidos es " << mayor(a, b, c)
<< " y el menor es " << menor(a, b, c) << endl;
*/
return 0;
}
int mayor(int n1, int n2) {
int tmp = n1;
if (n2 > tmp)
tmp = n2;
return tmp;
}
int menor(int n1, int n2) {
}
int mayor(int n1, int n2, int n3) {
}
int menor(int n1, int n2, int n3) {
}