1 / 6

KOMENTARI

KOMENTARI. Private Sub Command1_Click() 'Sve iza apostrofa su komentari. If Text1.Text > 0 Then 'Ako je Text okvira veci od nule tada MsgBox "Broj je veci od nule." 'ispisi poruku da je broj veci Else

eudora
Download Presentation

KOMENTARI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. KOMENTARI Private Sub Command1_Click() 'Sve iza apostrofa su komentari. If Text1.Text > 0 Then 'Ako je Text okvira veci od nule tada MsgBox "Broj je veci od nule." 'ispisi poruku da je broj veci Else MsgBox "Broj je manji od nule." 'ispisi poruku da je manji End If 'kraj if_then_else strukture. End Sub 'Eto, to su vam komentari!!! :)

  2. Private Sub Command10_Click() Dim a$ Dim n$ pocetak: Cls a$ = "abcèædðefghijklmnoqprsštuvwzžxyz" Print "Unesite slovo abecede i " Print "vidiceš na kojoj je poziciji u abecedi " n$ = InputBox("Unesi slovo abecede") For i = 1 To Len(a$) If Mid$(a$, i, 1) = n$ Then GoTo kraj End If Next i If Mid(a$, i, 1) <> n$ Then Print n$; " nije slovo abecede" GoTo pocetak End If kraj: Print n$; " je na "; i; " poziciji" End Sub

  3. Private Sub cmdime_Click() Dim a$ Dim n$ pocetak: Cls Print "Unesite svoje ime a zatim unesite slovo " Print "da bi vidjeli njegovu poziciji u imenu" a$ = InputBox("unesi ime") n$ = InputBox("Unesi slovo abecede") For i = 1 To Len(a$) If Mid$(a$, i, 1) = n$ Then GoTo kraj End If Next i If Mid(a$, i, 1) <> n$ Then Print n$; " nije slovo abecede" GoTo pocetak End If kraj: Print n$; " je na "; i; " poziciji" End Sub

  4. Mid – uzima određen broj znakova iz stringa počev od zadatog mjesta Mid (“Otorino”, 4,3) Rezultat rin

  5. Len– utvrđuje dužinu stringa Len (“Otorino”) Rezultat 7

  6. Ime unazad Private Sub Command18_Click() Cls Print “Citanje imena unazad" For i = 1 To 1000 Next i n$ = InputBox("Kako se zovete?") Cls Print "Hvala"; n$ Print For i = Len(n$) To 1 Step -1 r$ = r$ + (Mid$(n$, i, 1)) Next i Print "Vaše ime citano unazad je " Print Print r$ End Sub

More Related