the answer

牛延希  •  8个月前


#include<iostream>  
using namespace std;  
int main(){  

int a[101]={0}; 
for(int i=1;i<=100;i++){ 
   for(int j=1;j<=100;j++){ 
       if(j%i==0){ 
           a[j]=!(a[j]); 
       } 
   } 
}for(int i=1;i<=100;i++){ 
   if(a[i]==1) 
   cout<<i<<" "; 


return 0;  
}


评论: