2
0

add stuff of 16. Jan 26

This commit is contained in:
Schuledaniel
2026-01-16 08:15:01 +01:00
parent ec20b28fc4
commit 11a260008e
2 changed files with 29 additions and 2 deletions

View File

@@ -8,11 +8,12 @@ Wichtige Informationen
- Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis/?school=wvss-mannheim#/basic/timetablePublic/class?entityId=2583)
## 16-01-26 - PHP
- Modulo
## 14-01-26 - PHP
- Kryptologie (LBT3)
## 12-12-25 - PHP (SQL)
- Aufgabe von gester überarbeitet
- Unterrichts Projekt:

26
Zweites Jahr/modulo.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
$ergebnis = (int)(7/2);
echo $ergebnis."<br>";
$ergebnis = 7%3;
echo "Restwert: ".$ergebnis."<br>";
// Ist ZAhl gerade?
$zahl = 5;
if($zahl % 2 == 0)echo "$zahl is gerade.<br>";
else echo "$zahl ist ungerade.<br>";
// LEtze Zahl einer ZAhl ermitteln
$zahl = 123;
echo $zahl % 10; // In Zahl steht 3 wenn $zahl%=3
echo "<br>".$zahl."<br>";
echo (int)($zahl/10); // 123 -> 12