Skip to content

Commit

Permalink
added new folder called Algorithm. This folder will have various algo…
Browse files Browse the repository at this point in the history
…rithm related programs
  • Loading branch information
rakeshcusat committed Nov 14, 2011
1 parent 7601735 commit bb83242
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
33 changes: 33 additions & 0 deletions Algorithm/C/zigzagarray.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <stdio.h>

#define MAX_SIZE 4

void zigzagArray(int array[][MAX_SIZE], int size){

int rows=0;
int columns=0;

while(rows<size){
printf("%d ",array[rows][columns]);

if(rows==size-1){
rows = columns + 1;
columns = size - 1;
}else if(columns ==0){
columns = rows + 1;
rows = 0;
}else{
rows++;
columns--;
}
}//end of while
}

int main(int arc, char **argv){

int myarray[MAX_SIZE][MAX_SIZE]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}};

zigzagArray(myarray,MAX_SIZE);
return 0;
}

2 changes: 0 additions & 2 deletions LetMeKnow/src/com/rak/letmeknow/MyHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ protected void onPreExecute() {

dialog = new ProgressDialog((Context)ctx);
dialog.setMessage("Loading ....");


dialog.setIndeterminate(true);
dialog.setCancelable(false);
dialog.show();
Expand Down

0 comments on commit bb83242

Please sign in to comment.