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
~477 People Reached
Favorite Tags
php x 3
c++ x 1
Member Avatar for makimbo

I wrote this function in PHP. It divides each variable $votesX, where X is a politic party name, for 1,2,3... to the value of $seats. Now I've to search the the biggest values of the array and replace them with a zero. How can I do it? [CODE]function hondt ($votesA,$votesB,$votesC,$votesD,$votesE,$seats){ …

Member Avatar for Hani1991
0
241
Member Avatar for makimbo

I have this function: [CODE] function card_draw ($numeroDeobjetos) { for ($i=0; $i<$numeroDeobjetos; $i++) { $aleatorio=rand (1,40); $usada[$aleatorio]=true; } for ($i=0; $i<=39; $i++) { if ($usada[$i]==false) { echo '<img src="card.jpg">'; } else { echo '<img src="'.$i.'.jpg">'; } } }[/CODE] How can I do to prevent repeated numbers in $aleatorio? Thank you.

Member Avatar for makimbo
0
128
Member Avatar for makimbo

Hi! I wrote this program to generate a keyboard determined random numbers. [code] #include <stdio.h> #include <stdlib.h> #include <time.h> int amount, aleatory_numbers; int array[70]; int counter=0; int generator () { printf ("Introduce the amount of numbers that you wish: "); scanf ("%d", &amount); srand ( time(NULL) ); do { aleatory_numbers …

Member Avatar for StuXYZ
0
108