prDetector
public cpp v1 · immutable/*Program: Prime No. Detector.Description: Dectects prime No. in a specified range of numbers.Author: Metal_Creation Date: 16/12/2006*/#include <iostream.h>int main(){ int eNum; bool status=true; cout <<"Welcome to Prime No. Detector v.1.0 Beta\n"; cout <<"Enter the ending number:\n"; cin >>eNum; for(int i=3;i<=eNum;i++) { for(int p=2;p<i;p++) { if(i%p==0) { status=false; break; } } if (status) { cout <<i <<endl; } status=true;} return 0;}