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 / courage

#include<stdio.h>

int main()

{

int num=0;

printf("Enter number\n");

scanf("%d",&num);

int i,count=0,j;

for (i=1;i<=num;i++)

{

if (num%i==0)

{

for (j=1;j<=i;j++)

{

if(i%j==0)

{

count=count+1;

}

}

if (count==2)

{

printf("%d",i);

}

count=0;




}

}

}

Is This Answer Correct ?    4 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need arrays in c?

1080


What does %2f mean in c?

1157


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1075


write a program to generate address labels using structures?

4517


what is the basis for selection of arrays or pointers as data structure in a program

4249


Explain the difference between malloc() and calloc() function?

985


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1127


what is event driven software and what is procedural driven software?

2507


Explain what are its uses in c programming?

1014


How will you find a duplicate number in a array without negating the nos ?

2081


number of times a digit is present in a number

1988


Differentiate call by value and call by reference?

915


Subtract Two Number Without Using Subtraction Operator

780


Tell us the use of fflush() function in c language?

1083


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2409