Code:
#include <iostream.h>
#include <conio.h>
void main()
{

long int array[10] = {0,0,0,0,0,0,0,0,0,0};
int i, ctr1=0, flag,k,j;
char option,o;


    clrscr();
    loop:
    for (i=0; i<=10; i++)
        {
            cout<<"Enter input number(s)["<<i<<"]:";
            cin>>array[i];
            if (i>0) {
                for (int k=i-1; k>=0; k--)
                    if  (array[k]==array[i]){
                                cout<<"The input value already occurs!\n";
                                goto loop;
                            }
        }
    cout<<"\n";
    cout<<"Enter an option (either 1 or 2):";
    cin>>option;

        if (option=='1')  {

                cout<<"Prime number(s):\n";
                    for (i=0; i<=5; i++)
                        {
                            flag=0;
                            for (int j=2; j<=array[i]/2;j++)
                                {
                                    if (array[i]%j==0)
                                    cout<<array[i]<<" ";
                                        {
                                            flag=1;
                                            break;
                                        }
                                }

                            if (flag==0)
                            ctr1++;
                        }

                      cout<<array[i]<<" ";
                cout<<"\nNumbers of prime numbers entered:\n"<<ctr1<<endl;
                cout<<"Would you like to comtinue? y/n";
                cin>>o;    }

        cout<<"Program Terminated:\n" ;

}
}
quite easy.. hope you appreciate

Last edited by shabbir; 17Aug2012 at 14:56.. Reason: Code blocks