Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** my_isneg | ||
4 | ** File description: | ||
5 | ** Prints 'P' if the number (n) is positive | ||
6 | ** or 'N' if the number (n) is negative | ||
7 | */ | ||
8 | |||
9 | #include "my.h" | ||
10 | |||
11 | 2 | int my_isneg(int n) | |
12 | { | ||
13 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
|
2 | if (n < 0) { |
14 | 1 | my_putchar('N'); | |
15 | } else { | ||
16 | 1 | my_putchar('P'); | |
17 | } | ||
18 | 2 | return 0; | |
19 | } | ||
20 |