Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,151,276 members, 7,811,808 topics. Date: Sunday, 28 April 2024 at 08:10 PM |
Nairaland Forum / Science/Technology / Programming / Simple Php Challenge (9529 Views)
Please Help Me Write This Simple Php Switch Statement / Simple PHP Quiz: Kill The Rand() / Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? (2) (3) (4)
(1) (2) (3) (4) (Reply) (Go Down)
Re: Simple Php Challenge by Nobody: 1:10pm On Jul 14, 2013 |
spikes C: god of PHP, who's smiling now?? Anyway, Spikes' really good, wouldn't mind another challenge. |
Re: Simple Php Challenge by spikesC(m): 1:19pm On Jul 14, 2013 |
Judinho59: yeye man Do i need to argue, i won...shekina You used multiplication when the rules clearly stated addition |
Re: Simple Php Challenge by Nobody: 1:33pm On Jul 14, 2013 |
^^^ |
Re: Simple Php Challenge by elvis10ten(m): 1:53pm On Jul 14, 2013 |
spikes C:he used addition in the last code. |
Re: Simple Php Challenge by spikesC(m): 2:00pm On Jul 14, 2013 |
elvis10ten: he used addition in the last code.ehe? |
Re: Simple Php Challenge by elvis10ten(m): 2:25pm On Jul 14, 2013 |
NEW PROGRAMMING CHALLENGE https://www.nairaland.com/1358781/programming-challenge |
Re: Simple Php Challenge by Z8(m): 9:26pm On Jul 14, 2013 |
$j = 7 for($i = 7; $i<=300; $i++){ echo <<<EQD 7 X {$i } = {$j} EDQ; $j+=7; } // this will solve it... |
Re: Simple Php Challenge by bunmioguns(m): 11:41am On Jul 24, 2013 |
Okiki_Oluwa: @bunmioguns, je ki a sare pari ise yi. pari ise funra e ooo, i no dey there |
Re: Simple Php Challenge by timomaradona: 12:30pm On Feb 02, 2015 |
<?php $then = mktime(); for($i=1;$i<=300;$i++){ $sum = 0; for($j=0;$j<$i;$j++){ $sum += 7; } echo "7 x $i = $sum \n"; } $time = (mktime() - $then)/1000; echo "done in $time secs."; ?> |
Re: Simple Php Challenge by Cactus(m): 5:19pm On Feb 02, 2015 |
Dont know why replying this old post but if people are curious. Here ya go Option A <?php $sum = 0; for($i=1;$i<301;$i++) { echo "7 x $i = "; $sum += 7; echo "$sum \n"; } ?> Option B <?php for($i=1;$i<301;$i++) { echo "7 x $i = "; $arrnum[] = 7; echo array_sum($arrnum) . "\n"; } ?> |
I Need Help With This Adobe Master Collection Software / Application Development Using Csharp (C#) / Help On Java
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |