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

What are qualifiers and modifiers c?

956


What is the use of function overloading in C?

1110


What is 2 d array in c?

967


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2340


What is the newline escape sequence?

1032


Why is c called a mid-level programming language?

1159


How can I copy just a portion of a string?

1277


What is getche() function?

994


What does a function declared as pascal do differently?

1060


How do I use void main?

1058


What is c token?

1025


What are pointers really good for, anyway?

1022


Not all reserved words are written in lowercase. TRUE or FALSE?

1193


What is variable in c example?

1004


Write a program of prime number using recursion.

1043