add stuff of 16. Jan 26
This commit is contained in:
@@ -8,11 +8,12 @@ Wichtige Informationen
|
|||||||
- Stundenplan - [Link](https://wvss-mannheim.webuntis.com/WebUntis/?school=wvss-mannheim#/basic/timetablePublic/class?entityId=2583)
|
- 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
|
## 14-01-26 - PHP
|
||||||
|
|
||||||
- Kryptologie (LBT3)
|
- Kryptologie (LBT3)
|
||||||
|
|
||||||
|
|
||||||
## 12-12-25 - PHP (SQL)
|
## 12-12-25 - PHP (SQL)
|
||||||
- Aufgabe von gester überarbeitet
|
- Aufgabe von gester überarbeitet
|
||||||
- Unterrichts Projekt:
|
- Unterrichts Projekt:
|
||||||
|
|||||||
26
Zweites Jahr/modulo.php
Normal file
26
Zweites Jahr/modulo.php
Normal 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
|
||||||
Reference in New Issue
Block a user