answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i;

clrscr();

printf("Enter a Number:");

scanf("%d",&n);

printf("\n\nPrime Factors of %d is: ",n);

for(i=2;i<=n;i++)

{

if(n%i==0)

{

printf("%d,",i);

n=n/i;

i--;

if(n==1)

break;

}

}

getche();

}

this program will find the prime factors of a given numbe

any assistance

mail at :- devilllcreature@Yahoo.com

thank you

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program in c language to find prime factors of a given number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


One of two factors of a given number?

If the given number has two factors, one of them is 1.


Prime factors a number using c language?

#include#includevoid main(){int n,i;clrscr();printf("Enter a Number:");scanf("%d",&n);printf("\n\nPrime Factors of %d is: ",n);for(i=2;i


How do you know a number if its factors are given?

There are two ways in which the factors can be given. You are given all the prime factors (and their multiplicity). In that case simply multiply them all together. Or You are given each factor. In this case, the biggest of these is the number.


Is the number of factors of a given number is limited?

Yes.


How many distinct strings of factors are there for a given number?

It varies with each given number.


What is the difference between translators and compilers?

A compiler is a program that reads a program written in one language and translates it into another equivalent program in other language(target language).i.e, Hll------Mll A translator on the other hand translates a given language into many languages as per requirement like Chinese to English and others as per capability.


What is factors that appear in a complete list of factors for a given number only once?

distinct factors


How do you find the number of its given factors?

You multiply the factors together. if the factors are 6 and 7 or 2,3 and 7, then the number is 6x7=2x3x7=42


What is the difference between factors of a number and prime factors of a number?

All numbers have factors. Some factors are prime numbers. These are known as prime factors. The set of prime factors is a subset of the set of factors for any given number.


What is called when factors that appear in a complete list of factors for given number only once?

distinct factors


What is it called when all the whole numbers than can be divided into exactly a given number?

They're called the "factors" of the given number.