DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Kod()
sayı = Application.InputBox("Bir sayı giriniz.", , , , , , , 1)
If sayı <= 1 Then
MsgBox "Girdiğiniz sayı geçersiz. Lütfen 1'den büyük bir sayı giriniz."
Exit Sub
End If
For a = 2 To sayı - 1
If sayı Mod a = 0 Then
MsgBox sayı & " sayısı asal değil." & vbLf & "Böleni: " & a
Exit Sub
End If
Next
MsgBox sayı & " sayısı asal bir sayıdır."
End Sub