Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#define kelam "müdür!"
void main()
{
printf("hooppp %s\n", kelam);
}
@hasayvaz
hasayvaz / ogbilsis.c
Created March 2, 2011 17:43
öğrenci bilgi sistemi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ENUZUNDIZGI 100
#define ENFAZLAKAYIT 100
#define KAYITDOSYASI "kayitlar.txt"
#define True 1
#define False 0
struct ogrenci {
@hasayvaz
hasayvaz / hesapmak.py
Created March 8, 2011 00:44
kullanıcı adı-parola sorgulu hesap makinesi
# -*- coding: utf-8 -*-
import math
def mesaj():
print "\nVerdiğin seçenek numarasında belirlenmiş işlem yoktur. Lütfen tekrar işlem seçin..\n"
def secenek():
print "\n Seçenek << 1 >> Dort islem \n Secenek << 2 >> karekok-ust alma \n secenek << 3 >> trigonometrik islemler \n secenek << 4 >> faktoriyel alma \n secenek << 5 >> moduler hesap \n secenek << 6 >> Logaritma\n secenek << 7 >> Çıkış"
print " Hosgeldiniz..."
@hasayvaz
hasayvaz / fibotopla.py
Created March 18, 2011 18:28
fibonacci serisini göze alarak, serideki değerlerin hepsinin toplamını bulan program
#!/usr/bin/python
#-*-coding:utf-8-*-
def fibo(n):
if n == 0:
return 0
elif n == 1:
return 1
elif n > 1:
return fibo(n - 1) + fibo(n - 2)
@hasayvaz
hasayvaz / kattopla.py
Created March 18, 2011 19:28
verdiğiniz sınıra kadar istediğiniz iki sayının katlarının toplamını bulan program
#!/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:
@hasayvaz
hasayvaz / merhaba.bf
Created April 5, 2011 21:04
beef dilinde "Hello World!" programı
+++++ +++++
[
> +++++ ++
> +++++ +++++
> +++
> +
<<<< -
]
> ++ .
> + .
@hasayvaz
hasayvaz / terscevir.py
Created April 6, 2011 20:31
verilen bir sayiyi ters ceviren program
#!/usr/bin/python
def cevir(a):
a = str(a)
i = -1
b = ""
while -i < len(a) + 1:
b += a[i]
i -= 1
print int(b)
@hasayvaz
hasayvaz / romantikcocuk.py
Created May 9, 2011 23:21
her eve lazım :)
#-*- coding: utf-8
def name():
hayal = ["89", "69", "83", "105", "76"]
hayalet = ""
for i in hayal:
hayalet += chr(int(i))
return hayalet
def teklif():
@hasayvaz
hasayvaz / agac.cs
Created May 14, 2011 21:55
mini bir sözlük çalışması
using System;
using System.Collections;
using System.Collections.Generic;
namespace KelimeUzayi
{
class KelimeAgaci
{
Dictionary<string, string> d = new Dictionary<string, string>();
@hasayvaz
hasayvaz / regexp.rb
Created October 12, 2011 13:01
regular expressions examples in ruby
#!/usr/bin/ruby
string1 = "hasan eve kos, kos hasan kos"
if string1 =~ /^hasan/
puts "buldum ", $1
else
puts "bulamadim"
end