title: Print the prime numbers from 1 to 100
body: <p>The below code doesn't seem to print the prime numbers from 1 through 100.
  i am running two for loops in which am finding the modulus and then updating the count value (c).</p>
  
  <pre><code>using namespace std;
  int main(){
  
      for(int i=0,c=0;i&lt;100;i++){
          for(int j=1;j&lt;=i;j++){
              if(i%j==0){
                  c++;
              }
  
          }
           if(c&lt;=2){
                  cout&lt;&lt;i&lt;&lt;"\n";
              }
      }
      return 0;
  }
  </code></pre>