No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
Re: For the solve() u need not pass the arrays x[] n y[] at all as they are global according to ur source code. Also the solve() recursion if it occurs has to be terminated at some point right? wat is condition for termination? u can think about that. | |
Re: This shud do. [code=C++] #include<iostream.h> #include<conio.h> void main() { int a[10],b[10],i,j,flag=0; cout<<"\n Enter the elements of array 1"; for(i=0;i<4;i++) cin>>a[i]; cout<<"\n Enter the elements of array 2"; for(j=0;j<2;j++) cin>>b[j]; for(i=0;i<4;i++) { flag=0; for(j=0;j<2;j++) if(a[i]==b[j]) flag++; if(!flag) cout<<a[i]<< " "; } getch(); } [/code] | |
Re: There are a few errors. 1. In ur constructor u will have to use strcpy(phrase,aphrase); 2. then the header file for cout is not included This shud solve ur problem. | |
Re: U know wat a valid sudoku grid is right? Take a particular position in the grid say (i,j) check the ith row n jth column n check the 3x3 grid in which the particular element is present. if the element is not der either in the row r column or … |
The End.