正在加载图片...
案 #include <stdio. h> #include <math. h> nt maino Int n,1 printf( Input an integer: scanf( %d", &n) if(n %2==0) printf( %d is an even number. \n", n) else printf( %d is an odd number. \n", n) if(n>1) for(i=2: i<=sgrt(n); i++) f(n%i==0) printf(%d is not a prime \ n", n) goto loop 66 案。 #include <stdio.h> #include <math.h> int main() { int n,i; printf("Input an integer: "); scanf("%d",&n); if(n % 2==0) printf("%d is an even number.\n",n); else{ printf("%d is an odd number.\n",n); if(n>1) { for(i = 2; i <= sqrt(n); i++) { if(n%i==0) { printf("%d is not a prime\n",n); goto loop;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有