Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<math.h>
- void main()
- {
- int kt,n,i,dem=0;
- clrscr();
- printf("\nNhap n ");
- scanf("%d",&n);
- printf("%d = ",n);
- i=2;dem=0;
- while(n>1)
- {
- if(n%i==0)
- {
- n=n/i;
- ++dem;
- }
- if (n%i!=0 || n==1)
- {
- while(dem!=0)
- {
- printf("(%d,%d)",i,dem);
- break;
- }
- ++i;
- dem=0;
- }
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement