Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~849 People Reached
Favorite Forums
Favorite Tags
Member Avatar for sallubhai

Hi I wanted to draw a field like this photo which I have attached. I would appreciate your help. I have wrote so much now: for (int x = 2; x < 12; x++) { for (int y = 2; y <= 12; y++) { g.drawRect(40*x, 40*y, 40, 40); } …

Member Avatar for JamesCherrill
0
299
Member Avatar for sallubhai

Hi, I want to draw some rectangles with the same size and different colors by using an array but don´t know exactly how to do it in the for-loop. Thanks for help! [CODE]class Figure { private: int **figur; int row,col; public: Figure() : row(5), col(20){ } void allocate_place(int r, int …

0
104
Member Avatar for sallubhai

Hi, I want to draw some rectangles with the same size and different colors by using an array but don´t know exactly how to do it in the for-loop. [CODE]class Figure { private: int **figur; int row,col; public: Figure() : row(5), col(20){ } void allocate_place(int r, int c) { this->figur …

0
101
Member Avatar for sallubhai

Hi, How can I print this figure if I have an array like this? It should be a for-loop but don´t know how. [CODE] labyrinth = \ [[0,0,0,0,0,0,1,0], [0,1,0,1,1,1,1,0], [0,1,1,1,0,1,0,0], [0,1,0,0,0,0,0,0], [0,1,1,0,1,1,1,0], [0,0,1,1,1,0,0,0], [0,1,1,0,1,1,1,0], [0,1,0,0,0,0,0,0]] [/CODE] figure: ############. ## ## ##. . . . ## ##. . . ## #### …

Member Avatar for TrustyTony
0
139
Member Avatar for sallubhai

Hi, Is there anyone who know which complexity these functions are? I mean O(n), O(n^2), O(n^3), n log(n) or log(n) 1. --------------------------------------------- [CODE]void bogosort_array(double a[], int length) { do shuffle_array(a, length); while (! is_array_sorted(a, length)); }[/CODE] 2. --------------------------------------------- [CODE]void reverse_string(char* s) { int n = strlen(s); for (int i = …

Member Avatar for sallubhai
0
206