SHARE
TWEET

Untitled

a guest Jun 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. main()
  3. {
  4.     int n,i,f,j;
  5.     printf("enter the number : ");
  6.     scanf("%d", &n);
  7.     for(i=2;i<=n/2;i++)
  8.     {
  9.         f=1;       
  10.         for(j=2;j<=i/2;j++)
  11.         {
  12.             if(i%j==0)
  13.                 f=0;
  14.         }
  15.         if((f==1)&&(n%i==0))
  16.             printf("prime factor : %d\n", i);
  17.     }
  18. }
RAW Paste Data
Top