Start/ | End/ | |||
True | False | - | Line | Source |
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 | ||||
1 | 0 | 8 | int main(void) | |
9 | { | |||
10 | unsigned prime_candidate; | |||
11 | ||||
9 | 1 | 12 | while((prime_candidate = io_ask()) > 0) | |
13 | { | |||
4 | 5 | 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 | } | |||
1 | 19 | return 0; | ||
20 | } | |||
***TER 100% (6/6) of SOURCE FILE prime.c |