Prime Number Program

#include <iostream>

using namespace std;

int main()
{

int n=7;
int j,count ;
bool prime;

cout<<"get user input >";
cin>>n;

for(int count=0;count<=n;count++)

{ for(int j=5;j>count;j++)
{
cout<<" ";
}
for(int j=0;j<count;j++)
{
cout<<prime;
}
for(int j=1;j<count;j++)
{
cout<<prime;
}

cout<<endl;

}

cout<<endl;
return 0;

}




I managed to make a diamond using x however i need to make a diamond using prime number. i tried to write the program but i'm just lost. Would be great if anyone could help
Last edited on
thank you for your reply. but i as i said i managed to do that but when it comes to prime number i really dont know how to write it

........1
......121
....12321
..1235321
123575321
..1235321
....12321
......121
........1

the output without the '.'
Last edited on
Anyone?
Topic archived. No new replies allowed.