finding all prime #'s using "class Number"

Write a program that prompts the user to enter a number larger than 2. The program should use the Number class to determine the prime numbers between 2 and the number entered, and display them in the console window.

I've been stuck for a while now and just lost in implementing classes and contstructors. Please help!

1
2
3
4
5
6
7
8
9
10
#include <iostream>

using namespace std;


int main(int argc, char * argv[])
{
	cout << "Enter a number larger than 2: " << endl;
	int n;
	cin >> n;
Last edited on
1st find formula / procedure
what are the rule to find out a number is prime or not?(google.com)
2nd step is coding.

Topic archived. No new replies allowed.