0005.c 370 B

1234567891011121314151617181920212223242526
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. int
  4. main(int argc, const char **argv)
  5. {
  6. uint64_t res = 0;
  7. uint64_t i = 1, j = 1;
  8. uint64_t upper_limit = 20;
  9. while ( 1 ) {
  10. for ( j = 1; j <= upper_limit; ++j ) {
  11. if ( i % j != 0 ) {
  12. goto failed;
  13. }
  14. }
  15. res = i;
  16. break;
  17. failed:
  18. ++i;
  19. }
  20. printf("Result = %ld!\n", res);
  21. (void) argc; (void) argv;
  22. return 0;
  23. }