| Hits/True | False | - | Line | Source (found by option -s sourcedir) |
|
| | 1 | /* File prime.c ---------------------------------------------- */ |
| | 2 | /* This example demonstrates some elementary CTC++ properties. */ |
| | 3 | /* Not meant to be any good solution to the 'prime' problem. */ |
| | 4 | |
| | 5 | #include "io.h" |
| | 6 | #include "calc.h" |
| | 7 | |
| Top |
| 2 | | | 8 | int main(void) |
| | 9 | { |
| | 10 | unsigned prime_candidate; |
| | 11 | |
| 6 | 2 | | 12 | while((prime_candidate = io_ask()) > 0) |
| | 13 | { |
| 4 | 2 | | 14 | if (is_prime(prime_candidate)) |
| | 15 | io_report(prime_candidate, "IS a prime."); |
| | | | 16 | else |
| | 17 | io_report(prime_candidate, "IS NOT a prime."); |
| | 18 | } |
| 2 | | | 19 | return 0; |
| | | | 20 | } |
| ***TER 100 | % (6/6) of SOURCE FILE prime.c |
| 100 | % (6/6) statement |