Skip to content

Instantly share code, notes, and snippets.

View vekexasia's full-sized avatar

Andrea Baccega vekexasia

View GitHub Profile
@vekexasia
vekexasia / test2.php
Last active December 20, 2015 15:38 — forked from anonymous/test2.php
<?php
$arr = array();
for($i = 4; $i <= 1000000; $i++){
if(!isPrime($i)){
array_push($arr,$i);
}
}
function isPrime($number){
if ($number % 2 == 0) {
@vekexasia
vekexasia / test1.php
Last active December 20, 2015 15:29 — forked from anonymous/test1.php
<?php
$arr = array(1,2,3,4,5,6,7,8,9,10);
$arrLess = array();
$arrGret = array();
$total = 0;
$nuEle = count($arr);
foreach ($arr as $arr_ele){
$total += $arr_ele;
}