#include <iostream>
#include <cmath>
usingnamespace std;
class Prime
{
private:
int *array;
public:
Prime();
~Prime();
int find_prime(int);
void print_prime();
};
Prime::Prime()
{
int y;
int *array=newint[y];
}
Prime::~Prime()
{
delete[]array;
}
int Prime::find_prime(int size)
{
int *array=newint[size];
int counter=0;
int counter2=0;
for(int i = 1; i <=size; i++)
{
if(i % 2 != 0)
cout << i <<" ";
if(i % 2 !=0)
counter++;
if(counter%10==0)
cout<<endl;
}
}
void Prime::print_prime()
{
int input;
int choice;
do
{
cout << "Enter the number in which you want to find all prime numbers up to: "<<endl;
cin >> input;
find_prime(input);
cout<<"Enter 1 to find another number or 0 to exit: "<<endl;
cin>>choice;
}while(choice!=0);
}
int main()
{
Prime a;
a.print_prime();
system("pause");
return 0;
}