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 / priyanka chauhan

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
printf("Enter the no: ");
scanf("%d",&n);
for(j=2;j<=n;j++)
{
if(n%j==0)
{
for(i=2;i<=j-1;i++)
{
if(j%i==0)
break;
}
if(i==j)
printf("%d ",j);
}
}
getch();
}

Is This Answer Correct ?    23 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the array representation of a binary tree in C.

1227


How many keywords are there in c?

1076


What does char * * argv mean in c?

1055


Why c is called procedure oriented language?

1039


What is the use of bitwise operator?

1127


What is the purpose of main( ) in c language?

1132


What is c programing language?

1082


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1070


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

1117


What are keywords in c with examples?

1082


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1118


Explain how do you search data in a data file using random access method?

1132


What do you mean by recursion in c?

1104


How will you write a code for accessing the length of an array without assigning it to another variable?

1042


Do you know what are the properties of union in c?

1077