Visual Basic Final Sınavı Cevapları

Basic Cevapları :

Soru1:

Private Sub form_load()
Dim x, i, j As Integer
Dim x1, x2 As Double

‘a şıkkı
x = InputBox(“1000 ile 2000 arası bir değer girin:”)
x1 = x
For i = 1 To 10
x1 = x1 + (x * 0.057)
List1.AddItem i & “.ay sonu : ” & x1
Next i

‘b şıkkı
x2 = x

For j = 1 To 100
x2 = x2 + (x * 0.057)
If x2 > 5000 Or x2 = 5000 Then
MsgBox (“para ” & j & ” ay sonra 5000 tl olmuştur”)
Exit For
End If
Next j
End Sub

Soru 2:

Private sub form_Load()
Dim i,sayi, topla as integer
Toplam=0
For i = 1 to 20
Sayi = inputbox(i & “.sayiyi giriniz:”)
İf sayi mod 2=0 then
Toplam=toplam+sayi
End if
Next i
Msgbox toplam
End sub

Soru 3:

Private sub form_load()
Dim x as double
Dim a,i as integer
X=60000000
A= 0
For i = 0 to 10
A = 2000 + i
X = x + (x * 0.023)
List1.additem a & “ yılı nüfusu:” & x
Next i
End sub

Soru  4:

Private sub form_load()
Dim i, toplam as integer
List1.additem “2”
List1.additem “3”
List1.additem “5”
List1.additem “7”
Toplam = 4
For i = 8 to 100
İf i mod 2 <> 0 and i mod 3 <> 0 and i mod 5 <> 0 and i mod 7 <> 0 then
List1.additem i
Toplam = toplam + 1
End if
Next i
Msgbox (toplam & “ adet asal sayı var”)
End sub

Visual Basic Final Sınavı Cevapları

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>