【题目描述】 编程求2∼n(n为大于2的正整数)中有多少个素数。 【输入】 输入n(2≤n≤50000)。 【输出】 素数个数。 【输入样例】 10 【输出样例】 4 【代码】 #include <iostream> using namespace std; int f(int i) { for(