This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$in = file_get_contents("DATA2.txt"); | |
$data = explode("\n", $in); | |
foreach ($data as $instring){ | |
$finaldata = explode(" ", $instring); | |
$given = intval($finaldata[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Declare string to check | |
String with All of the vowels | |
String with All of the consonants | |
Make variable to count vowels | |
Make variable to count consonants | |
For length of string | |
Set achar to the current character of the strings | |
For length of vowels | |
If the current vowel equals the current character |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arr = array(3,6,7,9,10,6,7,2,1); | |
$count = 0; | |
foreach ($arr as $value) { | |
if($value >= 5){ | |
$count++; | |
} | |
} | |
echo $count; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$t1 = 120; | |
$t2 = 71; | |
$count = 2; | |
while($t2 < $t1){ | |
$temp = $t2; | |
$t2 = $t1-$t2; | |
$t1 = $temp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
table{ | |
background-color: yellow; | |
padding: 0px; | |
border-spacing:0; | |
} | |
td{ | |
border: 1px solid black; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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);"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$troutcost = 1; | |
$pikecost = 2; | |
$pickerelpoints = 3; | |
$total = 2 | |
$tpoints = 0; | |
$numtrout=0; | |
$numpike=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for($x = 0; x < 5; x++){ | |
for($y = 0; y < 6-$x; y++){ | |
echo "*"; | |
} | |
echo "<br>"; | |
} |