Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to generate prime factors of a given integer?

Answer Posted / neha

#include<stdio.h>
#include<conio.h>
int main()
{
int num,i=1,j,k;
printf("\n\tEnter the number:");
scanf("%d",&num);
while(i<=num)
{
k=0;
if(num%i==0)
{
j=1;
while(j<=i)
{
if(i%j==0)
k++;
}
j++;
if(k==2)
printf("\n\t%d is a Prime factor:"i);
}
i++;
}
return 0;
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where is volatile variable stored?

1034


Explain what are header files and explain what are its uses in c programming?

1120


i have a written test for microland please give me test pattern

2682


C program to find all possible outcomes of a dice?

2291


How can I remove the leading spaces from a string?

1105


How can you read a directory in a C program?

1099


Describe the modifier in c?

1065


Write a program to know whether the input number is an armstrong number.

1079


In which header file is the null macro defined?

1315


What are preprocessor directives in c?

1049


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1058


What are disadvantages of C language.

1118


What is double pointer in c?

992


What is else if ladder?

973


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

15943