|
|
вернуться в форумi will be greatful to u if ypu help me to sort out the error in this code.... #include<iostream> using namespace std; int main() { int j,i,temp=0,p=0,a[10]; long long int n,k; cin>>n; if (n/10==0) { cout<<1<<n; p=1; }
for(i=9,k=n,j=0;i>1&&p==0;) { if(k%i==0) { a[j++]=i; k=k/i; temp=1; } else i--; } for(i=--j;temp==1&&i>=0&&p==0;i--) { cout<<a[i]; } if (temp==0) cout<<-1; system("PAUSE"); return(0); }
Re: i will be greatful to u if ypu help me to sort out the error in this code.... system("PAUSE"); Don't use system pause. Edited by author 12.11.2009 09:02 |
|
|