SHOW:
|
|
- or go back to the newest paste.
1 | #include "maxmin.h" | |
2 | ||
3 | float maximo (float a, float b) | |
4 | { | |
5 | - | if(a>b) |
5 | + | if(a>b) { |
6 | - | return a; |
6 | + | return a; |
7 | - | else |
7 | + | } else { |
8 | - | return b; |
8 | + | return b; |
9 | } | |
10 | } | |
11 | ||
12 | float minimo(float a, float b) | |
13 | - | if(a>b) |
13 | + | |
14 | - | return b; |
14 | + | if(a>b) |
15 | - | else |
15 | + | { |
16 | - | return a; |
16 | + | return b; |
17 | } | |
18 | else | |
19 | { | |
20 | return a; | |
21 | } | |
22 | } |