Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  kj
Language: C/C++
Code:
#include <stdio.h>
int main(void) {
     int n,i,j,count=0;
     printf("enter thevalue of nn");
     scanf("%d",&n);
     for(i=2;i<=n;i++)
     {
         for(j=1;j<=i;j++)
         {
             if(i%j==0)
             count++;
         }
         if(count==2)
         printf("%dn",i);
     }
     return 0;
}

          
Comments: