Skip to content

Instantly share code, notes, and snippets.

View magmastonealex's full-sized avatar

Alex Roth magmastonealex

View GitHub Profile
<?php
for($x = 0; x < 5; x++){
for($y = 0; y < 5; y++){
echo "*";
}
echo "<br>";
}
<?php
for($x = 0; x < 5; x++){
for($y = 0; y < $x; y++){
echo "*";
}
echo "<br>";
}
<?php
for($x = 0; x < 5; x++){
for($y = 0; y < 6-$x; y++){
echo "*";
}
echo "<br>";
}
<?php
for($y = 0; $y < 4; $y++){
for($x =0 $x < $y; $x++){
echo "*";
}
}
echo "<br>";
for($y = 2; $y > 0; $y--){
for($x =0 $x < $y; $x++){
<?php
$troutcost = 1;
$pikecost = 2;
$pickerelpoints = 3;
$total = 2
$tpoints = 0;
$numtrout=0;
$numpike=0;
<!-- saved from url=(0025)http://magmastone.net/CS/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Computer Science - Alex Roth</title>
<link href="./Computer Science - Alex Roth_files/css" rel="stylesheet" type="text/css">
<link href="./Computer Science - Alex Roth_files/index.css" rel="stylesheet" type="text/css">
<script src="./Computer Science - Alex Roth_files/jquery.min.js"></script>
<script src="./Computer Science - Alex Roth_files/index.js"></script>
<style type="text/css"></style></head>
<body style="background-color: rgb(204, 204, 204);">
<?php
$troutcost = 1;
$pikecost = 2;
$piccost = 3;
$total = 2;
$totalposs = 0;
for($numt=0; $numt <= floor($total/$troutcost); $numt++){
for($numpi=0; $numpi <= floor($total/$pikecost); $numpi++){
for($numpic=0; $numpic <= floor($total/$piccost); $numpic++){
@magmastonealex
magmastonealex / a3q1.php
Created October 10, 2013 13:37
Assignment 3
<html>
<head>
<style>
table{
background-color: yellow;
padding: 0px;
border-spacing:0;
}
td{
border: 1px solid black;
<?php
$t1 = 120;
$t2 = 71;
$count = 2;
while($t2 < $t1){
$temp = $t2;
$t2 = $t1-$t2;
$t1 = $temp;
<?php
$arr = array(3,6,7,9,10,6,7,2,1);
$count = 0;
foreach ($arr as $value) {
if($value >= 5){
$count++;
}
}
echo $count;
?>