aufgabe vom 24-12-11 und vom 24-12-12
This commit is contained in:
13
progp/24-12-11 -- edicer 2/aufgabe.php
Normal file
13
progp/24-12-11 -- edicer 2/aufgabe.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$sost = ["8", "15","2","4","12","10","1"];
|
||||
$tage = ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag","Samstag", "Sontag"];
|
||||
|
||||
foreach ($sost as $key =>$value){
|
||||
$tag = $tage[$key];
|
||||
echo "<label>---$tag---</label><br>";
|
||||
echo "Am $tag waren es $value Stunde(n) Sonnenschein<br>";
|
||||
echo "Am Tag-Nr.: ". ($key+1). " gab es $value h Sonnenschein<br>";
|
||||
}
|
||||
|
||||
?>
|
||||
38
progp/24-12-12/matrix.php
Normal file
38
progp/24-12-12/matrix.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<style>
|
||||
* {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<h1>COPYRIGHT DANIEL</h1>
|
||||
<h2><a href="https://github.com/danielvici">GITHUB</a></h2>
|
||||
<?php
|
||||
// DAS DING IST EIN SMILE
|
||||
$matrix = array("zeile1" => array(93,6,0,32,52,117,32,86,120), // Y
|
||||
"zeile2" => array(32,86,177,177,155,207,185,120,49), // Y
|
||||
"zeile3" => array(92,253, 112,53,87,30, 105, 212,55), // Y
|
||||
"zeile4" => array(67, 212,18, 179,126,247,10 ,170,17), // Y
|
||||
"zeile5" => array(38, 190,43, 121,28,4 ,44, 230,17),// Y
|
||||
"zeile6" => array(1, 184,25, 175,194,241, 125, 185,30), // Y
|
||||
"zeile7" => array(28, 205,16,89,44,9, 87, 137,61),// Y
|
||||
"zeile8" => array(6, 35,162,243,172,221 ,180,24 ,101), // Y
|
||||
"zeile9" => array(57,7,74,76,17, 17 ,123,47, 2)// Y
|
||||
);
|
||||
|
||||
echo "<pre style='font-family: Courier New;'>";
|
||||
|
||||
foreach ($matrix as $row) {
|
||||
$output = "";
|
||||
foreach ($row as $value) {
|
||||
if ($value < 128) {
|
||||
$output .= " ";
|
||||
} else {
|
||||
$output .= "X";
|
||||
}
|
||||
}
|
||||
echo $output . "\n";
|
||||
}
|
||||
|
||||
echo "</pre>";
|
||||
|
||||
?>
|
||||
<p>Das Ding ist ein Smile.</p>
|
||||
50
progp/24-12-12/staedte.php
Normal file
50
progp/24-12-12/staedte.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Maschalla Tabelle</title>
|
||||
<style>
|
||||
*{
|
||||
text-align: center;
|
||||
}
|
||||
table{
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
.table-kopf{
|
||||
background-color: lightgrey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellpadding="0" width="380">
|
||||
<tr>
|
||||
<td width="150" class="table-kopf">Stadt</td>
|
||||
<td width="100" class="table-kopf">Land</td>
|
||||
<td width="130" class="table-kopf">Einwohner in Mio</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$staedte = array("stadt1"=> array("Bombay","India","12.916"),
|
||||
"stadt2"=> array("Buenos Aires","Argentinien","11.624"),
|
||||
"stadt3"=> array("Seoul","Süd Korea","11.019"),
|
||||
"stadt4"=> array("Jakurata","Indonesien","10.226"),
|
||||
"stadt5"=> array("Delhi","Indien","10.095"),
|
||||
"stadt6"=> array("Manila","Philippinen","10.032"),
|
||||
"stadt7"=> array("Karachi","Pakistan","10.032"),
|
||||
"stadt8"=> array("Sao Paulo","Brasilien","9.921"),
|
||||
"stadt9"=> array("Istanbul","Türkei","9.018"),
|
||||
"stadt10"=> array("Shanghai","China","8.914"),
|
||||
);
|
||||
|
||||
foreach($staedte as $ausgabe){
|
||||
list($stadt, $land, $ew) = $ausgabe;
|
||||
echo "<tr><td>$stadt</td><td>$land</td><td>$ew</td></tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user