文档库

最新最全的文档下载
当前位置:文档库 > How many prime numbers

How many prime numbers

How many prime numbers

Problem Description

Give you a lot of positive integers, just to find out how many prime numbers there are.

Input

T here are a lot of cases. In each case, there is an integer N representing the number of integers to find. Each integer won’t exceed 32-bit signed integer, and each of them won’t be less than 2.

Output

F or each case, print the number of prime numbers you have found out

Sample Input

3

2 3 4

Sample Output

2

程序代码:

#include

#include

using namespace std;

double a;

int sum;

int n;

bool prime(){

How many prime numbers

(共2页)