Advertisement
nguyenhappy92

Tìm tất cả các ước số của một số nguyên dương

Oct 16th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // tinh uoc so nguyen hien co
  2. // Khai bao cac ham thu vien neu co
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. void main()
  7. {
  8. int n;
  9. scanf("%d",&n);
  10. for(int i=1;i<=n;i++)
  11. {
  12. if(n%i==0)
  13. {
  14. printf("%d\t",i);
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement