1 / 7

Broja čki programski ciklusi

Broja čki programski ciklusi. Prikazati tablicu množenja brojevima 5, 6 i 7. Dim i As Integer Print “ i ” , ” 5i ” , ” 6i ” , ” 7i ” Print For i = 1 To 10 Print i, i*5, i*6, i *7 Next i. Izračunati proizvod prvih 15 prirodnih brojeva.

chance
Download Presentation

Broja čki programski ciklusi

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. Brojački programski ciklusi

  2. Prikazati tablicu množenja brojevima 5, 6 i 7. Dim i As Integer Print “i”, ”5i” ,”6i” ,”7i” Print For i = 1 To 10 Print i,i*5,i*6, i*7 Next i

  3. Izračunati proizvod prvih 15 prirodnih brojeva. Dim P As Integer‘ ovde je greska, treba drugi tip podataka  Dim i As Integer P = 1 For i = 1 To 15 P = P * i Next i Print P ‘program bi trebao da prijavi gresku Overflow ‘zato sto -32768 < Integer < 32767

  4. Izračunati zbir kvadrata prvih 10 brojeva. Dim S As Integer, i As Integer S = 0 For i = 1 To 10 S = S + i^2 Next i Print S

  5. Izračunati razliku zbira brojeva od 1 do 50 i zbira neparnih brojeva od 1 do 35. Dim S1 As Integer, S2 As Integer Dim R As Integer, i As Integer S1 = 0 For i = 1 To 50 S1 = S1 + i Next i S2 = 0 For i = 1 To 35 Step 2 S2 = S2 + i Next i R = S1 – S2 Print R

  6. Prikazati tabelarno kvadrate i kubove za prvih 10 prirodnih brojeva. Dim i As Integer Print “i”, “i^2”,”i^3” Print For i = 1 To 10 Print i,i^2,i^3 Next i

  7. Izračunati zbir prirodnih brojeva manjih od 500 deljivih sa 3 i prikazati koliko ih ima.*

More Related