返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.      for(int x = 2; x <= 100000++)
  7.      {
  8.       int i=2;
  9.      while(x >= i)
  10.      {
  11.         if(x == i)
  12.         {         
  13.             cout << x <<"";        
  14.         }               
  15.         else if((x % i)== 0)
  16.         {
  17.             break;                    
  18.         }
  19.         i++;
  20.         }
  21.      system("pause");
  22.   }  return 0;
  23. }
複製代碼

TOP

返回列表