This file contains 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
// nxn'lik bir matrise Gauss Elimination uygulayan program | |
// Mehmet Mert Yıldıran 12060367 | |
// Ubuntu terminal altında çalıştırma: | |
// gcc gauss.c -o gauss | |
// ./gauss | |
#include<stdio.h> | |
#define MAX 10 | |
int lcm(int x,int y); |
This file contains 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
// nxn'lik bir matrise Cramer uygulayan program | |
// Mehmet Mert Yıldıran 12060367 | |
// Ubuntu terminal altında çalıştırma: | |
// gcc cramer.c -o cramer | |
// ./cramer | |
#include<stdio.h> | |
void readmatrix(int m[][8], int s){ | |
int i,j; | |
printf("Matrisin elemanlarını sırasıyla Enter'a basarak giriniz: \n"); |
This file contains 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
# QuickFind programı | |
# Mehmet Mert Yildiran 12060367 | |
# Ubuntu üzerinde çalıştırmak için: | |
# ruby quickfind.rb | |
class QuickFind | |
def initialize(n) | |
@ids = [] | |
0.upto(n-1) {|i| @ids[i] = i} | |
end |
This file contains 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
girdi = "on3d1oku5zm7ayis3" | |
sayilar = "0123456789" | |
toplam = 0 | |
i=0 | |
while i < girdi.length | |
j=0 | |
while j < sayilar.length | |
if girdi[i] == sayilar[j] | |
toplam += girdi[i].to_i |
This file contains 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
girdi=[1,[2,3],4,[5],[6,7]] | |
b=[] | |
i=0 | |
while i < girdi.length | |
if girdi[i].kind_of?(Array) | |
if !girdi[i][0].nil? | |
b << girdi[i][0] | |
end | |
if !girdi[i][1].nil? | |
b << girdi[i][1] |
This file contains 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
a="merve" | |
b="evrem" | |
i=0 | |
y=b.length - 1 | |
saydir=0 | |
if a.length == b.length | |
while i < a.length | |
if a[i]==b[y] | |
saydir += 1 |
This file contains 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
#encoding: UTF-8 | |
class Merhaba | |
def self.class_method | |
puts "Merhaba, ben bir sınıf metoduyum!" | |
end | |
def instance_method | |
puts "Merhaba, ben bir nesne metoduyum!" | |
end | |
end |
This file contains 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
import csv | |
import time | |
started = time.clock() | |
hash_list = [] | |
unique_hash_list = [] | |
print "\n>> TABLE: << \n" | |
with open('liste.csv', 'rb') as csvfile: |
This file contains 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
def BinaryTree(r): | |
return [r, [], []] | |
def insertLeft(root,newBranch): | |
t = root.pop(1) | |
if len(t) > 1: | |
root.insert(1, [newBranch,t,[]]) | |
else: | |
root.insert(1, [newBranch, [], []]) | |
return root |
This file contains 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/ruby | |
# encoding: utf-8 | |
class Point | |
# XXX Her nitelik için okuyucu yazmamız gerekmiyor | |
attr_reader :x, :y | |
def initialize(x, y) | |
@x, @y = x, y | |
end |