0_0_14152460_2059.cpp:1:646: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/stdio.h>in: Invalid argument
#include<stdio.h>int common[10];int num1;int num2;/*初始化*/void init(){ int i; for(i=0;i<10;i++) common[i]=0; num2=0;}/*求公约数函数*/void get_common(int n){ int i=0; int j=0; int x=2; for(;x<=n;x++) { while(n%x==0) { common[i]=x; if(j==0)//这是while循环的第一个 i++; n=n/x; j=1; } j=0; } num1=i-1;}/*判断新旧朋友*/void judge(int x){ int i; for(i=0;i<=num1;i++) { if(x%common[i]==0) { num2++; return; } }}void main() { int i,j; int x,y; printf("输入总数\n"); scanf("%d",&y); for(j=1;j<=y;j++) { printf("输入测试数:\n"); scanf("%d",&x); init(); get_common(x); for(i=2;i<=x;i++) judge(i); printf("%d\n",x-num2); }}
^
compilation terminated.
|