Traditional Culture Encyclopedia - Traditional culture - Output the prime numbers between 100-200, which are represented by traditional flow chart and N-S diagram.
Output the prime numbers between 100-200, which are represented by traditional flow chart and N-S diagram.
# include & ltiostream & gt
Use namespace std
void main()?
{ ?
All prime numbers between cout & lt& lt" 100-200 are: "
int k = 0;
for(int I = 100; I & lt=200; i++)
{
int m = 0;
for(int a = 1; a & lt= I; a++)
{
if(I % a = = 0)m++;
}
if(m = = 2){ cout & lt; & lt me<& lt ""; k+= I; }
}
cout & lt& ltendl
Cout & lt& lt "These prime numbers are:"
}
The number of prime numbers is infinite. There is a classic proof in Euclid's Elements of Geometry. It uses a common proof method: reduction to absurdity. The concrete proof is as follows: Suppose there are only a limited number of prime numbers, which are arranged as p 1, p2, ..., pn from small to large, and let n = P 1× P2×...× PN, then is it a prime number?
References:
Baidu encyclopedia of prime numbers
- Related articles
- How to make beef with sauce? home cooking
- Seek for poems that motivate to study and advance (with sources, ancient poems!)
- What are the traditional activities in Tomb-Sweeping Day since ancient times?
- Why do some common home decoration choose gray marble tiles?
- What does the sun symbolize in the tattoo? (I'm going to get a tattoo on my left hand, wrist and back of my hand.)
- Allegories and Symbols of Rabbits in Japan
- Brewing technology-Temperature requirements for raw material brewing
- Why do people in Taiwan Province Province like to worship Mazu?
- How did you delete the video of Pizhou Red Flag Coking Plant beating migrant workers? Who still has it?
- Why is the Spring Festival the most cohesive festival?