Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  3
Language: C/C++
Code:
#include<iostream.h>
void main()
{
int x,d,g,n;
cout<<"n=";cin>>n;
for(int i=1;i<=n;i++)
{
g=0;
cout<<"x=";
cin>>x;
for(d=2;d<=x/2;d++)
if (x%d==0) {cout<<d<<endl; g=1; }
if(g==0) cout<<x<<" numar prim"<<endl;
}
}
          
Comments: