‘Einer wird gewinnen, ein Abzähl Spiel programmieren mit VB-Script
Option Explicit
Dim n, m, i, x, count, flag
Dim Spieler()
n = InputBox(“Anzahl der Spieler?”)
m = InputBox(“Zähler?”)
ReDim Spieler(n)
count = 0
For x=1 To n-1
For i=1 To m
flag = 0
count = count+1
if count-n > 0 then
count = count-n
end if
if (Spieler(count)=”out”) then
do while flag=0
count = count+1
if count-n > 0 then
count = count-n
end if
if (Spieler(count)<>”out”) then
flag = 1
end if
loop
end if
Next
Spieler(count) = “out”
Next
For x=1 To n
if Spieler(x) <> “out” then
msgbox “Spieler ” & x & ” ist der Gewinner!”
‘Denn Gewinner des Abzähl Spiels ausgeben
end if
Next
Latest Entries
- kostenlose Vorlage von Kaufvertrag für Verkauf
- schnell und einfach online einen günstigen Flug finden
- iphone Schaden Display defekt! Kann ich es selber austauschen?
- günstige SMS ins Ausland versenden
- Hauswürste online kaufen. Bestellen und schon bringt es die Post.
- Wo ist sie hin unsere Kreativität, ist sie für immer verloren?!

No Comments
Leave a Comment
trackback address
You must log in to post a comment.