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
what value is returned to operating system after program execution?
shorting algorithmS
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
What are structures and unions? State differencves between them.
What is pointer & why it is used?
What is the difference between arrays and pointers?
Can one function call another?
can any one provide me the notes of data structure for ignou cs-62 paper
What is a pointer value and address in c?
What is int main () in c?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
What is the use of typedef in structure in c?
What are the different file extensions involved when programming in C?
What is 2 d array in c?
Why pointers are used in c?