#include <iostream>
#include <iomanip>
using namespace std;
#define maxn 100
void main11()
{
//const auto maxn = 100;
long primes_i[maxn] = { 2, 3, 6 };
long trail_i = 5;
auto count_i = 3;
auto found_i = false;
do
{
trail_i += 2;
found_i = false;
for (int i{}; i < count_i; i++)
{
found_i = (trail_i % * (primes_i + i)) == 0;
if (found_i)
break;
}
if (!found_i)
{
*(primes_i + count_i++) = trail_i;
}
} while (count_i < maxn);
for (int i{}; i < maxn; i++)
{
if (i % 5 == 0)
{
cout << endl;
}
cout << setw(10) << *(primes_i + i);
}
cout << endl;
system("pause");
}
其中
*(primes_i + count_i++) = trail_i;
是什么意思