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
how is the examination pattern?
What does %p mean c?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Differentiate Source Codes from Object Codes
Is c object oriented?
Where local variables are stored in c?
Why is c called a structured programming language?
What is malloc() function?
What is atoi and atof in c?
Write the control statements in C language
What is a stream?
Why main function is special give two reasons?
What are the types of bitwise operator?
Subtract Two Number Without Using Subtraction Operator
Why calloc is better than malloc?