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 / sourav das

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,k,l,n;
clrscr();
printf("Enter The Number:");
scanf("%d",&n);
i=1;
while(i<=n)
{
if(n%i==0)
{
j=1;
k=0;
l=1;
while(l<=j)
{
if(j%l==0)
k++;
l++;
}
if(k==2)
{
printf("\n%d is the prime factor of %d",l-1,n);
}
}
i++;
}
getch();
}

Is This Answer Correct ?    26 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2309


What does == mean in texting?

1237


What is use of #include in c?

1112


What is a null string in c?

1001


write a program to create a sparse matrix using dynamic memory allocation.

4855


Difference between goto, long jmp() and setjmp()?

1134


Explain what is the concatenation operator?

1122


What does the c in ctime mean?

1034


What is the use of structure padding in c?

1023


How many levels deep can include files be nested?

1115


How pointer is different from array?

1030


Can we declare variables anywhere in c?

964


What is the code for 3 questions and answer check in VisualBasic.Net?

2124


how to create duplicate link list using C???

2522


Is fortran still used today?

1055