Erste If, Else und Elseif verzweigung
This commit is contained in:
parent
7e2dbaf4a0
commit
ab300e7990
9
PowerShell/If, Else und Elseif.ps1
Normal file
9
PowerShell/If, Else und Elseif.ps1
Normal file
@ -0,0 +1,9 @@
|
||||
$farbe = Read-Host "Was ist deine lieblingsfarbe?"
|
||||
if($farbe -eq "rot") {
|
||||
Write-Host "Gute Wahl!"}
|
||||
elseif($farbe -eq "blau") {
|
||||
Write-Host "Stabil Bruder!"}
|
||||
elseif($farbe -eq "schwarz") {
|
||||
Write-Host "Geht besser, aber geht!"}
|
||||
else {
|
||||
Write-Host "$farbe ist scheiße!"}
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user