C Program To Find Prime Factors of a Number using Function

preview_player
Показать описание

A positive integer is entered through the keyboard. Write a function to obtain the prime factors of this number.

For Example, prime factors of 24 are 2, 2, 2 and 3. Whereas prime factors of 35 are 5 and 7.

Prime Number: Any natural number which is greater than 1 and has only two factors i.e., 1 and the number itself is called a prime number.

All the numbers which perfectly divide a given number are called as Factors of that number.

Note: The user entered number need not be a prime number. But the factors of the number must be prime number.

For example, 24 and 35 are not prime numbers. But the prime factors of 24 are 2, 2, 2, and 3. Here both 2 and 3 are prime numbers. Similarly, prime factors of 35 are 5 and 7. Both 5 and 7 are prime numbers.

C Programming Interview / Viva Q&A List

C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

Hands down the best explanation i have found online. Thank you so much!

WW-hpyt
Автор

i love when he uses visual logic explanation

evash
Автор

Hats off!! Such an easy explanation 😃👍🏻❤️

krishma
Автор

Thank youn so much
looking for simple and acurate explanation

akashdas
Автор

brilliant explanation. Thank you so much !

P.S: You deserve way more subscribers :D

rafeed
Автор

brilliant!
Elegant algorithm to find the prime factorization. Thank you so much!

adzplus
Автор

Can we use if statement in place of while loop?

gourabdutta
Автор

Sir
Your teaching method is very best
Sir why you not upload other languages tutorial like JavaScript,
C++, data structure and alogrithm
Sir these start languages.

icccricket
Автор

Thank you for the brilliant explanation! :D

linting
Автор

hey bro Awesome Explanation Could please upload more videos and Start DSA playlist in c++ plz

nagendrapp