- الكود:
#include <iostream >
using namespace std;
- الكود:
int main()
{
int h=0, N,o=0;
cin >> N;
for (int i = 2; N >= i; ++i)
{
for (int j = 2; j < i; ++j)
{
if (i % j == 0)
{
h++ ;
break ;
}
- الكود:
}
if (h==0)
{
o++;
}
h=0;
{
- الكود:
//cout << o << "\n";
}
}
cout<<"Slacker"<<o;
return 0;
}
| |||||
|
PRIME NUMBERS | THE NUMBER |
0 | 1 |
1 | 2 |
2 | 3 |
3 | 5 |
4 | 7 |
5 | 11 |
6 | 13 |
7 | 17 |
8 | 19 |
9 | 23 |
10 | 29 |
11 | 31 |
12 | 37 |
13 | 41 |
14 | 43 |
15 | 47 |
16 | 53 |
17 | 59 |
18 | 61 |
19 | 67 |
20 | 71 |
21 | 73 |
22 | 79 |
23 | 83 |
24 | 89 |
25 | 97 |