This is a discussion on programming challenge... within the Entertainment and Recreation forums, part of the General offtopic discussions category; I think I need to sleep. My program had change & giving me this: p p p p p p ...
| |||||||
| Entertainment and Recreation Everything related to entertainment like movies, jokes and other funny stuff goes here |
| LinkBack | Thread Tools | Display Modes |
| | #41 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | I think I need to sleep. My program had change & giving me this: p p p p p p p p p p p p p p p p |
| | |
| | #42 | ||
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | Quote:
Quote:
-F Last edited by Punch Farce; 08-06-09 at 01:50 AM. Reason: Automerged Doublepost | ||
| | |
| | #43 |
| Guest
Posts: n/a
| i = -1; n = 0; j = 0; k = 0; l = 0; while (n <17) { if (i < 3) { i++; k = 0; } else { l++; k = l; } for (j = 0; j<= i-l; j++) { char2DArray[i-j][k]=charArray[n]; n++; k++; } } |
| |
| | #44 | |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | more complexion coming up. version 2.0 with more features and flexibility ;-) > a.out 0 > a.out 1 a > a.out 2 ac bd > a.out 3 acf beh dgi > a.out 4 acfj beim dhlo gknp > Quote:
does this work? plese post output. (please don't post source until later) thanks -f Last edited by Punch Farce; 08-06-09 at 01:55 AM. Reason: Automerged Doublepost | |
| | |
| | #45 |
| Guest
Posts: n/a
| are you guys discussing a different program, i jus got the answer for the first one ... should i post it now ?? |
| |
| | #46 | |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | Quote:
yes please, just the results, let's give Luke some time till we post the code. -F | |
| | |
| | #47 | |
| Guest
Posts: n/a
| Quote:
i = -1; n = 0; j = 0; k = 0; l = 0; while (n <17) { if (i < 3) i++; else l++; k = 0; for (j = 0; j<= i-l; j++) { char2DArray[i-j][k]=charArray[n]; n++; k++; } } Try this farce ;-) Last edited by Pri_dm; 08-06-09 at 02:01 AM. Reason: Automerged Doublepost | |
| |
| | #48 |
| Guest
Posts: n/a
| |
| |
| | #49 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | class Math { public static void main(String[] args) { char[] charArray={'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p'}; char[][] char2DArray=new char[4][4]; char[][] a=new char[4][4]; for(int x=0; x<charArray.length; x++){ for(int d=0; d<char2DArray.length; d++){ for(int b=0; b<char2DArray[d].length; b++){ char2DArray[b][d] = (char)charArray[x]; }}} for(int i = 0; i <= 3; i++) { System.out.print(""); for(int j = 0; j <= 3; j++) { System.out.print(" " + char2DArray[i][j]); } System.out.println(""); } System.out.println(); } } What the hell had happened that this is not copying? @Farce can I pm you my poetry again? |
| | |
| | #50 |
| Guest
Posts: n/a
| |
| |
| | #51 | |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | Quote:
This is good but can't understand head or tail of it in one go. No you don't. It is for advice. I will give you final version before other. will come to see response 7 min later. Last edited by Luke Skywalker; 08-06-09 at 02:05 AM. Reason: Automerged Doublepost | |
| | |
| | #52 | |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | Quote:
sure, PM me. -F | |
| | |
| | #53 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | Now I am using C++. So that farce can help me. Of course tell me why array is not copying. Last edited by Luke Skywalker; 08-06-09 at 02:12 AM. Reason: Automerged Doublepost |
| | |
| | #54 | |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | Quote:
> !cc cc pri.c > a.out Segmentation Fault (core dumped) > | |
| | |
| | #55 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | I am using C++ . Farce if you can tell me what is wrong with array copying I will use java. |
| | |
| | #56 |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | |
| | |
| | #57 |
| Guest
Posts: n/a
| |
| |
| | #58 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | Again getting this a e i m b f j n c g k o d h l p class Math { public static void main(String[] args) { char[] charArray={'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p'}; char[][] char2DArray=new char[4][4]; char[][] a=new char[4][4]; int c=0; for(int d=0; d<char2DArray.length; d++){ for(int b=0; b<char2DArray[d].length; b++){ char2DArray[b][d] = (char)charArray[c]; c ++; }} for(int i = 0; i <= 3; i++) { System.out.print(""); for(int j = 0; j <= 3; j++) { System.out.print(" " + char2DArray[i][j]); } System.out.println(""); } System.out.println(); } } Situation solve ,able to copy now trying to produce as given Last edited by Luke Skywalker; 08-06-09 at 02:21 AM. Reason: Automerged Doublepost |
| | |
| | #59 |
| Platinum Member Join Date: Sep 2008
Posts: 3,140
Rep Power: 10 | |
| | |
| | #60 |
| Jedi knight Join Date: Jul 2009 Location: IBF Age: 21
Posts: 1,818
Rep Power: 5 | |
| | |
| Tags |
| challenge, programming |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vote: would you like to have a programming section in IBF ? | newprouser | Suggestions and Complaints | 30 | 08-30-09 12:56 AM |
| Java Programming : Doubts | newprouser | Windows | 20 | 08-19-09 11:20 PM |
| Tata Sky Plus challenge | devrajofjaipur | Tata sky | 2 | 05-20-09 01:50 PM |
| Any how to videos for Flash Programming? | vishnu54 | Windows | 0 | 05-06-09 05:28 PM |