| 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 | * @file my_isneg.c | ||
| 10 | * @brief The file containing the my_isneg function | ||
| 11 | * @author Nicolas TORO | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include "my.h" | ||
| 15 | |||
| 16 | 2 | void my_isneg(int n) | |
| 17 | { | ||
| 18 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
|
2 | if (n < 0) |
| 19 | 1 | my_putchar('N'); | |
| 20 | else | ||
| 21 | 1 | my_putchar('P'); | |
| 22 | 2 | } | |
| 23 |