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
| dizi1=[1,2,3,4,5,6,7] | |
| dizi2=[5,6,7,8,9,0] | |
| def kesisim(dizi1,dizi2) | |
| kesisim=[] | |
| dizi2.each do |e| | |
| if dizi1.include?(e) | |
| kesisim<<e | |
| end | |
| end |
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
| soru 1) a) aritmetik ortalama | |
| def aritmetik_ortalama(dizi) | |
| t=0 | |
| dizi.each do |e| | |
| t+=e | |
| end | |
| return t/dizi.length | |
| end | |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int a,b,i; | |
| printf("Alt sınırı girin\n"); | |
| scanf("%d" , &a); | |
| printf("Üst sınırı girin\n"); | |
| scanf("%d" , &b); | |
| for(i=a; i<=b ; i++) | |
| { |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int a,x; | |
| int toplam=2,sayac=1; | |
| printf("üstel sayıyı girin:"); | |
| scanf("%d",&x); | |
| printf("\nn\t2^n\n"); | |
| printf("----------------------"); | |
| for(a=1;a<=x;a++) |
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
| #include <stdio.h> | |
| #include <ctype.h> | |
| int main(void) | |
| { | |
| int c; | |
| c=getchar(); | |
| while(c !=EOF) | |
| { | |
| if(islower(c)) | |
| c=toupper(c); |
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
| #include <stdio.h> | |
| #include <ctype.h> | |
| int main(void) | |
| { | |
| int c; | |
| for(; ;) | |
| { | |
| c=getchar(); | |
| if(islower(c)) | |
| c=toupper(c); |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int h,l,k,hacim,agirlik; | |
| printf("Yüksekliği giriniz:"); | |
| scanf("%i", &h); | |
| printf("Uzunluğu giriniz:"); | |
| scanf("%i", &l); | |
| printf("Genişliği giriniz:"); | |
| scanf("%i", &k); |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int x,y; | |
| printf("x değerini giriniz:"); | |
| scanf("%d",&x); | |
| y=((((3*x+2)*x-5)*x-1)*x+7)*x-6; | |
| printf("İşlemin Sonucu %d dir.", y); | |
| return 0; | |
| } |
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
| #include<stdio.h> | |
| int main() | |
| { | |
| int a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,r,satir1,satir2,satir3,satir4,sutun1,sutun2,sutun3,sutun4,capraz1,capraz2; | |
| printf("1 den 16 ya kadar olan sayilari karısık olarak giriniz\n"); | |
| scanf("%d",&a); | |
| scanf("%d",&b); | |
| scanf("%d",&c); | |
| scanf("%d",&d); | |
| scanf("%d",&e); |
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
| #include <stdio.h> | |
| char * sifrele(char * dizi) | |
| { | |
| int *ptr,sayac; | |
| *ptr=dizi; | |
| sayac=1; | |
| { | |
| while(*ptr) |