Giter Site home page Giter Site logo

factorization's Issues

check 배열 사용이유에 대한 질문

check 배열을 만드신 이유가 소수인 경우에만 체크를 하려고 하신 것 같습니다. 그런데 코드 123줄부터의
while (n % i == 0) n /= i;
이 부분을 보면 이미 작은 소수들로 나눴기 때문에 120줄의
if (check[i] == 0 && n % i == 0)
이부분에서의 check[i] == 0 을 지워도 똑같이 작동될 것 같아 질문 드립니다.

make 명령어 실행시 warning 발생

make 명령어를 사용할 시 다음과 같은 warning이 납니다. 개발환경은 MacOS입니다.

./factorization.c:169:20: warning: passing 'unsigned char [65536]' to parameter
      of type 'char *' converts between pointers to integer types with different
      sign [-Wpointer-sign]
        find_prime_number(check, sqrt_number(number), number);
                          ^~~~~
./factorization.c:111:30: note: passing argument to parameter 'check' here
void    find_prime_number(char *check, unsigned int n_sqrt, unsigned int n)
                                ^
1 warning generated.
complete

타입 관련해 warning이 나는 것 같은데 함수 선언할 때 매개변수 타입을 수정하시거나 gcc 옵션을 제거하면 해결할 수 있을 것 같습니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.