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
I think main should have a return type (since you are returning 0 ,it should be int). Also case statements must be in a parenthesis block { if.... else.... break; }
I was using getline() function and it was getting skipped. I searched through the forum and found the tutorial on how to flush the input stream but there is one thing that is still unclear to me : getline() uses newline character as a delimiter. So when a '\n' is …
To use all those functions in one program you need to call them in main at different stages (or as you need). You can use conditional statement( if else,switch case) like : [CODE] #include <iostream> void randnmbr(); int main() { int x; cout<<"Enter 1 for printing a random number...."; cout<<"Enter …
This is a problem in a programming contest but I am stuck at it for the past two days Here is a link to the problem : [URL="http://www.techgig.com/codecontest_detail.php?type=advanced"]http://www.techgig.com/codecontest_detail.php?type=advanced[/URL] [CODE]void DrowningVillage(int gridSize,int villageHeights[][10],int origin[]) { int i=0,j,k=0,x=origin[1],y=origin[0],z=0,output1[100],Heights[10][10]; for(i=0;i<gridSize+2;i++) for(j=0;j<gridSize+2;j++) Heights[i][j]=1000; //For removing garbage values and for later comparisons for(i=0;i<gridSize;i++) for(j=0;j<gridSize;j++) Heights[i+1][j+1]=villageHeights[i][j]; …
The End.
ag_17