Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
echo "<!DOCTYPE html>\t\n<html>\t\n<head>\t\t\n<title>E3 Grösste</title>\t\t\n</head>\t\n<body>\t\n";
|
||||
$lottozahlen = [23, 43, 24, 7, 2, 27];
|
||||
$groesste = $lottozahlen[0];
|
||||
|
||||
|
||||
|
||||
foreach ($lottozahlen as $zahl) {
|
||||
|
||||
if ($zahl > $groesste) {
|
||||
$groesste = $zahl;
|
||||
}
|
||||
}
|
||||
|
||||
echo "<center><h1>Größte Zahl im Array</h1>\t\n<p>Die größte Zahl im Array ist: $groesste.</p></center>";
|
||||
echo "</body>\t\n</html>";
|
||||
?>
|
||||
Reference in New Issue
Block a user