-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from ufouser09/main
Add files via upload
- Loading branch information
Showing
328 changed files
with
7,390 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
1-1/Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma1.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdio.h> | ||
|
||
int main(){ | ||
//degiskenleri tanımladık | ||
int yas,yil,dogumYili; | ||
|
||
|
||
//kullanıcıdan yillari aldik | ||
printf("lutfen yili giriniz \n"); | ||
scanf("%d",&yil); | ||
|
||
|
||
//kullanıcıdan dogum yilini aldik | ||
printf("lutfen dogum yilinizi giriniz \n"); | ||
scanf("%d",&dogumYili); | ||
|
||
|
||
//yas'ı hesapladık | ||
yas=yil-dogumYili; | ||
|
||
|
||
//yas'ı yazdır | ||
printf("kullanicinin yasi =%d",yas); | ||
} | ||
//denendi ve compile edildi | ||
//dogum tarihi verilen kişinin yaşını bulan algoritma ve programi | ||
//sayfa 1 | ||
//kod calısıyor |
17 changes: 17 additions & 0 deletions
17
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma10.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <stdio.h> | ||
|
||
int main(){ | ||
int a,b,c,d,mod; | ||
printf("iki sayi giriniz\n "); | ||
scanf("%d%d",&a,&b); | ||
|
||
c=a/b; | ||
d=c*b; | ||
mod=a-d; | ||
printf("modumuz=%d",mod); | ||
|
||
} | ||
//denendi ve compile edildi | ||
//mod alan algoritma ve programi | ||
//sayfa 10 | ||
//kod calısıyor |
23 changes: 23 additions & 0 deletions
23
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma11.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,i,BYK; | ||
printf("dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
BYK=A[0]; | ||
for(i=1;i<N;i++){ | ||
if(A[i]>BYK){ | ||
BYK=A[i]; | ||
} | ||
|
||
} | ||
printf("%d",BYK); | ||
return 0; | ||
} | ||
//deneme ve compile yapildi | ||
//bir dizinin en buyuk elemanini bulan algoritma ve programi | ||
//sayfa 11 | ||
//kod çalışıyor |
42 changes: 42 additions & 0 deletions
42
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma12.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
|
||
int N,byk1,byk2,i; | ||
printf("dizinin eleman sayisini giriniz\n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
|
||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
|
||
if(A[0]>A[1]){ | ||
byk1=A[0]; | ||
byk2=A[1]; | ||
} | ||
else{ | ||
byk1=A[1]; | ||
byk2=A[0]; | ||
} | ||
|
||
for(i=2;i<N;i++){ | ||
if(A[i]>byk2){ | ||
|
||
if(A[i]>byk1){ | ||
byk2=byk1; | ||
byk1=A[i]; | ||
} | ||
else { | ||
byk2=A[i]; | ||
} | ||
} | ||
} | ||
printf("%d",byk2); | ||
return 0; | ||
} | ||
|
||
|
||
//deneme ve compile yapildi | ||
//bir dizinin ikinci buyuk elemanini bulan algoritma ve programi. | ||
//sayfa 11 | ||
//kod calısıyor |
35 changes: 35 additions & 0 deletions
35
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma13.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,byk,kck,yerk,yerb,i; | ||
printf("lütfen dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
|
||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
|
||
byk=A[0]; | ||
yerb=1; | ||
kck=A[0]; | ||
yerk=1; | ||
|
||
for(i=1;i<N;i++){ | ||
if(A[i]>byk){ | ||
byk=A[i]; | ||
yerb=i+1; | ||
} | ||
else if(A[i]<kck){ | ||
kck=A[i]; | ||
yerk=i+1; | ||
} | ||
} | ||
printf("buyuk sayimiz =%d yeri=%d kucuk sayimiz =%d yeri=%d",byk,yerb,kck,yerk); | ||
return 0; | ||
} | ||
|
||
|
||
//denendi ve compile yapildi | ||
//bir dizinin en buyuk ve en kucuk elemanlarini ve yerini bulan algoritma ve programi | ||
//sayfa 12 | ||
//kod calısıyor |
39 changes: 39 additions & 0 deletions
39
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma14.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int i,N,elde=0,top=0; | ||
printf("lutfen dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
int B[N]; | ||
int C[N]; | ||
printf("A dizisini giriniz:\n"); | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
|
||
printf("B dizisini giriniz:\n"); | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&B[i]); | ||
} | ||
for(i=N;i>=1;i--){ | ||
top=A[i]+B[i]+elde; | ||
elde=top/2; | ||
C[i+1]=top%2; | ||
} | ||
C[0]=elde; | ||
for(i=0;i<=N+1;i++){ | ||
printf("%d",C[i]); | ||
} | ||
return 0; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// | ||
//ikilik düzende ayni basamakli iki sayi verildiginde bunlarin toplamini yapan algoritma ve programi | ||
//sayfa 13 |
41 changes: 41 additions & 0 deletions
41
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma15.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int j,N,elde,i,top=0; | ||
printf("lutfen dizinin boyutunu giriniz:\n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
int B[N]; | ||
int C[N+1]; | ||
for(i=0;i<=N;i++){ | ||
C[i]=0; | ||
} | ||
elde =0; | ||
printf("lutfen A dizisini giriniz:\n"); | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
|
||
} | ||
printf("lutfen B dizisini giriniz:\n"); | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&B[i]); | ||
} | ||
j=N; | ||
for(i=N-1;i>=0;i--){ | ||
|
||
top=A[i]+B[i]+elde; | ||
C[j]=top %10; | ||
elde=top/10; | ||
j--; | ||
} | ||
C[0]=elde; | ||
for(i=0;i<=N;i++){ | ||
printf("%d",C[i]); | ||
|
||
} | ||
return 0; | ||
} | ||
//herbir digiti(hanesi) bir dizinin bir elemani olarak verilen | ||
//N digitlik iki sayi arasinda toplama islemi yaparak elde edeceginiz degeri | ||
//yeni bir diziye yerlestiren algoritma ve programi | ||
//sayfa 13 | ||
//kod calisiyor |
28 changes: 28 additions & 0 deletions
28
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma16.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,bas=0,i; | ||
|
||
printf("lutfen dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
for(i=0;i<N;i++){ | ||
if(A[i]>=50){ | ||
bas=bas+1; | ||
} | ||
} | ||
printf("%d kisilik sinifin %d si basarilidir \n",N,bas); | ||
return 0; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
//deneme ve compile yapildi | ||
//bir siniftaki 50 ögrencinin bir dersten aldiklari yıl sonu notlari veriliyor.basari notu 50 olduguna göre kac ögrencinin basarili oldugunu bulan algoritma ve programi. | ||
//sayfa 14 | ||
//kod calısıyor |
29 changes: 29 additions & 0 deletions
29
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma17.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,k=0,i; | ||
printf("dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
int A[N]; | ||
int C[N]; | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
|
||
|
||
for(i=0;i<N;i++){ | ||
if(A[i]%20==0){ | ||
|
||
C[k]=A[i]; | ||
k=k+1; | ||
} | ||
} | ||
|
||
for(i=0;i<k;i++){ | ||
printf("hem 4 e hem 5 e bolunen sayilar=%d\n",C[i]); | ||
} | ||
return 0; | ||
} | ||
//deneme ve compile yapildi | ||
//bir dizide hem 4 e hem 5 e bolunebilen sayilari bulan algoritma ve programi | ||
//sayfa 14 | ||
//kod calýsýyor |
26 changes: 26 additions & 0 deletions
26
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma19.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,i,j,k,l,r,nn; | ||
printf("lutfen dizinin boyutunu giriniz \n"); | ||
scanf("%d",&N); | ||
nn=N-1; | ||
int A[N]; | ||
int C[N]; | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
for(i=0;i<N;i++){ | ||
k=A[i]%10; | ||
l=A[i]/10; | ||
r=(k*10)+l; | ||
C[nn-i]=r; | ||
} | ||
for(j=0;j<N;j++){ | ||
printf("%d\n",C[j]); | ||
} | ||
|
||
} | ||
//deneme ve compile yapildi | ||
//47-29-34-11 dizisinden 11-43-92-74 dizisini elde eden algoritma ve programi | ||
//sayfa 15 | ||
//kod calýsýyor |
20 changes: 20 additions & 0 deletions
20
1-1/Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma2.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
//degiskenleri tanımla | ||
int a,b,toplam; | ||
|
||
//kullanicidan 2 tane sayi al | ||
printf("iki tane sayi giriniz \n"); | ||
scanf("%d %d",&a,&b); | ||
|
||
//toplamı yazdir | ||
toplam=a+b; | ||
|
||
printf("iki sayinin toplami=%d",toplam); | ||
|
||
|
||
} | ||
//denendi ve compile edildi | ||
//2 sayinin toplamini bulan algoritma ve programi | ||
//sayfa 1 | ||
//kod calısıyor |
23 changes: 23 additions & 0 deletions
23
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma20.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,B,C,T,i; | ||
printf("lutfen dizinin boyutunu giriniz:\n"); | ||
scanf("%d",&N); | ||
printf("bir sayi giriniz\n"); | ||
scanf("%d",&B); | ||
int A[N]; | ||
C=1; | ||
T=0; | ||
printf("A dizisini giriniz\n"); | ||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
for(i=N-1;i>=1;i--){ | ||
T=T+(A[i]*C); | ||
C=C*B; | ||
|
||
} | ||
printf("%d",T); | ||
} | ||
//herhangi bir düzendeki bir sayinin onluk düzene cevrilmesini saglayan algoritma ve programi | ||
//sayfa 16 |
34 changes: 34 additions & 0 deletions
34
...Bilgisayar Bilimlerine Giriş/kodlar_lablar/kodlar/2021_efe_girgin/ALGORİTMA/algoritma21.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <stdio.h> | ||
int main(){ | ||
int N,b,m,i,j; | ||
|
||
printf("lutfen dizinin boyutunu giriniz\n"); | ||
scanf("%d",&N); | ||
|
||
printf("lutfen bir sayi giriniz\n"); | ||
scanf("%d",&b); | ||
|
||
int A[N]; | ||
|
||
for(i=0;i<N;i++){ | ||
scanf("%d",&A[i]); | ||
} | ||
|
||
i=1; | ||
|
||
while(N>=b){ | ||
m=N%b; | ||
N=N/6; | ||
A[i]=m; | ||
i=i+1; | ||
} | ||
A[i]=N; | ||
|
||
for(j=i;i>=1;i--){ | ||
printf("%d",A[j]); | ||
} | ||
return 0; | ||
} | ||
//onluk düzendeki sayiyi herhangi bir duzene ceviren algoritma ve programi | ||
//sayfa 16 | ||
//2.soru |
Oops, something went wrong.