Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define UPPER_TEST 1000000000
- int DivisorTest (int dividend) {
- for (int divisor = 1; divisor <=20; divisor++) {
- if ((dividend % divisor) > 0) {
- return 0;
- }
- }
- printf("%i\n", dividend);
- return 1;
- }
- int main (int argc, const char * argv[]) {
- printf("Starting Test:\n");
- for (int test = 1; test <= UPPER_TEST; test++) {
- DivisorTest(test);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement