Created
March 18, 2011 19:28
-
-
Save hasayvaz/876681 to your computer and use it in GitHub Desktop.
verdiğiniz sınıra kadar istediğiniz iki sayının katlarının toplamını bulan program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| #-*-coding:utf-8-*- | |
| sayi1 = 3 | |
| sayi2 = 5 | |
| sinir = input("lutfen sınır sayısını girin : ") | |
| a = [] | |
| top = 0 | |
| for i in range(1, sinir+1): | |
| if i % 3 == 0 or i % 5 == 0: | |
| a.append(i) | |
| top += i | |
| print "3 ve 5 sayılarının katlarının toplamı : ", top |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment