分解质因数

时间:2017-01-26 12:27:40   收藏:0   阅读:271

#include<stdio.h>
int main(void)
{ int n;
scanf("%d",&n);
int t=2;
while(n>1)
{

if(n%t==0)
{
printf("%d\n",t);
n=n/t;

}
else t++;
}


}

原文:http://www.cnblogs.com/zzy0218/p/6351419.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!