/*PRIME Number is a number who can divide by only 1 or itself
so we have check number by dividing 2 to (number-1)
if it is fully divisible by any number from 2 to (number-1)
means if remainder is zero then number is NOT A PRIME Number,
else it is PRIME Number.
We can find PRIME Numbers from 1 to given number n.
*/
#include
#include
void main()
{
long int number,i,f=0,n=1,c=1; //variable declaration
clrscr(); //clears the screen
printf("Enter Last Number (eg. 200): "); //Information on monitor to user for input
scanf("%ld",&n); //Takes number from keyboard
printf("\nList of all PRIME numbers upto %ld\n",n);
c=1;
while(c<=n)
{ f=0;
number=c;
for(i=2;i