Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- start:
- Dim numr As Integer
- Dim ile As Integer
- Dim k As String
- Dim scrtxt As String
- Dim la As Integer
- Dim lb As Integer
- Dim wyn As Integer
- Dim wf1 As Integer
- Dim znak As String
- Dim wf2 As Integer
- Dim x As Integer
- Dim pktp As Integer
- Dim punkty As Integer
- Cls
- scrtxt=" MathLand to gra, w ktorej sprawdzisz swoj matematyczny talent. Na ekranie beda wyswietlane rozne dzialania matematyczne, a ty bedziesz musial wybrac wlasciwa odpowiedz. W grze rozwiazujesz ile chcesz dzialan, za dzialania sa takie punkty: Dodawanie-1 Odejmowanie-2 Mnozenie-3 Dzielenie-4. Pozniej otrzymasz srednia punktow. Powodzenia zycza: ruter i ktostam450 z grupy Polon Soft "
- Color (5,0)
- Locate 5,27
- Print "MathLand-instrukcja obslugi"
- Locate 9,22
- Print "Nacisnij spacje, jesli juz to czytales"
- Print
- Print " Gra jest integralna czescia nakladki WinDOS grupy Polon Soft !"
- Print
- Print Tab (21);"Autorzy programu: ruter i ktostam450/pls"
- Do
- For pozs As Integer=0 To Len(scrtxt)
- Color (14,0)
- Locate 7,1
- Print Mid (scrtxt,pozs,80)
- k=InKey
- If k=" " Then GoTo gra
- Sleep (100,1)
- Next
- Loop
- Do
- gra:
- Cls
- Randomize Timer
- la=Int (20*Rnd)+4
- Randomize Timer
- lb=Int (20*Rnd)+6
- Randomize Timer
- x=Int (3*Rnd)
- Select Case x
- Case 0
- wyn=la+lb
- znak="+"
- pktp=1
- Case 1
- wyn=la-lb
- znak="-"
- pktp=2
- Case 2
- wyn=la*lb
- znak="*"
- pktp=3
- Case 3
- wyn=la/lb
- znak="/"
- pktp=4
- End Select
- Randomize Timer
- wf1=wyn+Int(Rnd*8)
- Randomize Timer
- wf2=wyn-Int(Rnd*12)+2
- Print "Runda:";numr;" Punkty:"unkty
- Print "Dzialanie: "
- Print
- Color (14,0)
- Print la
- Color (10,0)
- Sleep (900,1)
- Print " ";znak
- Sleep (900,1)
- Color (14,0)
- Print lb
- Print
- Input "Ile to jest";ile
- If ile=wyn Then
- Print Chr(13);"Brawo!, otrzymujesz "ktp;" punktow"
- punkty=punkty+pktp
- Else
- Print Chr(13);"Zla odpowiedz, nie otrzymujesz punktow"
- EndIf
- Print
- Print "Nacisnij enter aby przejsc do kolejnej rundy, spc aby wyjsc"
- numr+=1
- Do
- k=InKey
- Loop until k<>""
- If k=Chr (13) Then GoTo f
- If k=" " Then GoTo pods
- f:
- Loop
- pods:
- Cls
- Print "Podsumowanie:"
- Print "Na ";numr;" pytan uzyskales punktow:"unkty
- Print "To jest "unkty/numr;" pkt za jedno pytanie."
- Print
- spr:
- Print "Chcesz zagrac jeszcze raz? (t/n,cr)"
- Input k
- k=UCase(k)
- If k="T" Then GoTo start
- If k="N" Then End
- GoTo spr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement