Skip to content

Instantly share code, notes, and snippets.

View pasali's full-sized avatar
🎯
Focusing

Mehmet Başal pasali

🎯
Focusing
View GitHub Profile
@pasali
pasali / bonus.c
Created November 27, 2011 20:03
ayrıkBonus
#include<stdio.h>
#include<time.h>
float hesapla(int x)
{
int kalan;
kalan = x % 4;
switch (kalan){
case 1:return 2;
case 2:return -3;
@pasali
pasali / alis1bsık.c
Created November 27, 2011 18:03
föy 4
#include<stdio.h>
#include<string.h>
int main(void){
char dizi2[]= "istambul";
char *dizi5 = dizi2;
char dizi[8];
char *p = dizi;
while(*dizi5 != '\0'){
#include <stdio.h>
#include <string.h>
int main(){
char dizi[] = " zaza dayi 271";
char ek[110];
char *p = dizi;
int j=0 ;
while(*p != '\0'){
if (*p != ' '){
#include<stdio.h>
#include<string.h>
void bol(int *p, int pivot)
{
char a[50];
char b[50];
int i = 0,j = 0;
while( *p != '\0' )
{
#include <stdio.h>
#include <string.h>
int main(){
char dizi[] = " zaza dayi ";
char ek[110];
char *p = dizi;
int j=0 ;
while(*p != '\0'){
if (*p != ' '){
@pasali
pasali / 4.py
Created November 17, 2011 22:23
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main(){
char ifade[] = " 232sdfjhf\n\t asd \0";
char *p = ifade;
int sayac = 0;
int count = 0;
int gorun = 0;
#!/usr/bin/env python
#-*-coding:utf-8-*-
class LogicGate:
def __init__(self, n):
self.label = n
def GetLabel(self):
return self.label
@pasali
pasali / 3kere.c
Created October 30, 2011 18:27
sorular
#include <stdio.h>
#include <string.h>
main(void) {
char dizi[] = "mmmehhhmmmettt";
char d;
int i= 0;
int sayac = 1;
for (i ;i<= strlen(dizi);i++){
if(d == dizi[i]){
#!/usr/bin/env python
#-*-coding:utf-8-*-
class kompleks:
def __init__(self, x, y):
self.reel = x
self.sanal = y
def mutlak(self):
mut = (self.reel**2 +self.sanal**2)**0.5
@pasali
pasali / oz.py
Created May 19, 2011 12:05
alistirmalar
def fak(n):
if n < 0:
print "Negatif sayıların faktöriyeli alınamaz."
return
else:
if n == 0 or n == 1:
return 1
else:
return n * fak(n-1)