Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,154,639 members, 7,823,809 topics. Date: Friday, 10 May 2024 at 03:47 PM |
Nairaland Forum / Science/Technology / Programming / Please Help Me Write This Simple Php Switch Statement (839 Views)
Magento Theme Tutorial: Find Out How To Switch To Different Theme / Fizzbuzz Problem Using "Switch" Statement Construct / Help A Java Newbie With This Simple Java Program (2) (3) (4)
Please Help Me Write This Simple Php Switch Statement by Nobody: 12:45am On Jul 27, 2015 |
Nor laugh me oo Question: 4 green balls 5 yellow balls 6 blue balls 7 white balls 9 black balls if i pick 9 balls What is the the probability of picking black and white The solution should be in a script .Thanks 1 Like 1 Share |
Re: Please Help Me Write This Simple Php Switch Statement by Abduletudaye(m): 5:10am On Jul 27, 2015 |
Yungwizzzy: You've got to be kidding me |
Re: Please Help Me Write This Simple Php Switch Statement by DonSegmond(m): 5:12am On Jul 27, 2015 |
Yungwizzzy: If you can't solve this, then perhaps your problem is not a programming problem, but a probability problem. You must be able to solve the problem on a piece of a paper before a computer. The computer is no substitute for thinking. With that said, if you want to know how to use a switch statement with php. http://php.net/manual/en/control-structures.switch.php For probability, this should help, http://mathforum.org/dr.math/faq/faq.prob.intro.html 1 Like 1 Share |
Re: Please Help Me Write This Simple Php Switch Statement by veltany: 8:11am On Jul 27, 2015 |
<?php /* probability(p) is calculated as posible outcomes(x)/required outcomes(t). P=x/t func probability($arg1,$arg2) return: int $result */ function probability($x,$t) { return $x/$t; } //example $p=probability(9,25); echo $p; ?> 2 Likes |
(1) (Reply)
Android Games Ideas / How To Do JWT Authentication Using A Delegatehandler In WEBAPI / Selling On Your Site Made Easy. Get Fully Functional E-commerce Website
(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. 9 |