Write a program to generate prime factors of a given integer?
Answer Posted / kalee
Pseudo code: Algorithm ....
If N is the integer, then, any number greater than sqrt(N) will not be a factor of that integer...
so it is enough to check till sqrt(N) integers, that is it is divisible or not... further, if N is odd... forget all the even integers, as they cannot be a part of factors.. :)
Happy coding...
Is This Answer Correct ? | 6 Yes | 9 No |
Post New Answer View All Answers
formula to convert 2500mmh2o into m3/hr
Why C language is a procedural language?
What is function and its example?
How #define works?
Why flag is used in c?
What is far pointer in c?
What is the newline escape sequence?
Are pointers really faster than arrays?
Explain high-order bytes.
Which is better between malloc and calloc?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
How are portions of a program disabled in demo versions?
How macro execution is faster than function ?
What is function prototype in c with example?
How is a structure member accessed?