hello friends plz tell me how i print the prime numbers from 1-1000 in for loop in c++.
plz help me

The Sieve of Eratosthenes is popular.
You might want to start there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.