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 do I create a directory? How do I remove a directory (and its contents)?
Are comments included during the compilation stage and placed in the EXE file as well?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
code for quick sort?
What is the value of uninitialized variable in c?
What do you mean by keywords in c?
Why c is called a middle level language?
What is the -> in c?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Why is c called "mother" language?
What are the different types of C instructions?
What are structure members?
Explain how does flowchart help in writing a program?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is the value of a[3] if integer a[] = {5,4,3,2,1}?