标签:
// 将100~200之间的素数输出 #include <stdio.h> #include <math.h> int main() { int i,j; printf("100~200之间的素数如下:\n"); for(i = 101; i <= 199; i++ ) { for( j = 2; j <= sqrt(i); j++ ) { if( i % j == 0 ) break; } if( sqrt(i) < j ) printf("%d\t",i); } printf("\n"); return 0; } <img src="http://img.blog.csdn.net/20150423115250262?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
标签:
原文地址:http://blog.csdn.net/zhaoyaqian552/article/details/45219839