To Display Prime Numbers From m to n

This is a C example to Display Prime numbers from m to n.

You can compile this program on bOtskOOl Free Online C/C++ Compiler


void main()
 int j,fact ;
 char ch;
 long int m, n,i;
 printf("\nEnter the number From which you want to add prime number: " );
 printf("\nUpto which number: ") ;
 printf("\nPrime nos. between %ld to %ld are:\n",m,n);

 if (i%j==0)
 printf(" %d ",i);







Download Source Code


Terms of Agreement: 
By using this code, you agree to the following terms- 
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge. 
2) You MAY NOT redistribute this code (for example to a web site) without written permission from us. Failure to do so is a violation of copyright laws. 
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which may have placed in the code or code's description.

>>Kindly post your doubts and suggestions on our discussion forum.