Skip to content

Commit e82de25

Browse files
committed
C# kodları ve şemalrın bir kısmı eklendi ✌
1 parent cea3f0f commit e82de25

File tree

11 files changed

+189
-1
lines changed

11 files changed

+189
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace KosulaGoreSayiBulmak
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
int i, adet = 0;
14+
for (i = 2; i < 100; i++)
15+
if ((i * 2 + 1) % 5 == 0)
16+
adet++;
17+
Console.WriteLine("Adet= " + adet);
18+
Console.ReadLine();
19+
}
20+
}
21+
}
11 KB
Loading

6-İstatistik/Istatistik.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Istatistik
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
int i, t_adet = 0, c_adet = 0;
14+
float t_toplam = 0, t_ort, c_toplam = 0, c_ort;
15+
for (i = 2; i < 100; i++)
16+
{
17+
if (i % 2 == 1)
18+
{
19+
t_adet++;
20+
t_toplam = t_toplam + i;
21+
}
22+
else
23+
{
24+
c_adet++;
25+
c_toplam = c_toplam + i;
26+
}
27+
}
28+
t_ort = t_toplam / t_adet;
29+
c_ort = c_toplam / c_adet;
30+
Console.WriteLine(t_toplam);
31+
Console.WriteLine(t_ort);
32+
Console.WriteLine(c_toplam);
33+
Console.WriteLine(c_ort);
34+
Console.ReadLine();
35+
}
36+
}
37+
}

6-İstatistik/IstatistikŞema.png

22.1 KB
Loading

7-İstatistik-2/Istatistik2.cs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Istatistik2
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
int adet = 20, x, buyuk, kucuk, i, p = 0, j = 0;
14+
float ort = 0, p_ort = 0;
15+
x = Convert.ToInt32(Console.ReadLine());
16+
buyuk = x;
17+
kucuk = x;
18+
if (x > 0)
19+
{
20+
p_ort = p_ort + x;
21+
p++;
22+
}
23+
if (x > 100 && x < 200)
24+
j++;
25+
ort = ort + x;
26+
27+
for (i = 0; i < adet - 1; i++)
28+
{
29+
x = Convert.ToInt32(Console.ReadLine());
30+
if (x > 0)
31+
{
32+
p_ort = p_ort + x;
33+
p++;
34+
}
35+
if (x > 100 && x < 200)
36+
j++;
37+
38+
if (x > buyuk)
39+
buyuk = x;
40+
if (x < kucuk)
41+
kucuk = x;
42+
ort = ort + x;
43+
44+
}
45+
ort = ort / adet;
46+
p_ort = p_ort / p;
47+
Console.WriteLine(ort);
48+
Console.WriteLine(buyuk);
49+
Console.WriteLine(kucuk);
50+
Console.WriteLine(p_ort);
51+
Console.WriteLine(j);
52+
Console.ReadLine();
53+
}
54+
}
55+
}
46.4 KB
Loading

B-AsalSayılar/Asal.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Asal
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
int i, x, j;
14+
for (i = 11; i < 100; i++)
15+
{
16+
x = 2; j = 0;
17+
while (x != i)
18+
{
19+
if (i % x == 0)
20+
{
21+
j = 1;
22+
break;
23+
}
24+
else x++;
25+
}
26+
if (j == 0)
27+
Console.WriteLine(i);
28+
}
29+
Console.ReadLine();
30+
}
31+
}
32+
}

B-AsalSayılar/AsalŞema.png

17.9 KB
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace YakiniBulmak
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
14+
int x, sayi, yakinlik, enyakin, i, enyakin2 = -1, yakinlik2 = -1;
15+
sayi = Convert.ToInt32(Console.ReadLine());
16+
x = Convert.ToInt32(Console.ReadLine());
17+
enyakin = x;
18+
yakinlik = Math.Abs(x - sayi);
19+
for (i = 0; i < 9; i++)
20+
{
21+
x = Convert.ToInt32(Console.ReadLine());
22+
if (Math.Abs(x - sayi) < yakinlik)
23+
{
24+
yakinlik = Math.Abs(x - sayi);
25+
enyakin = x;
26+
}
27+
else if (Math.Abs(x - sayi) == yakinlik)
28+
{
29+
if (x != enyakin)
30+
{
31+
yakinlik2 = yakinlik;
32+
enyakin2 = x;
33+
}
34+
35+
}
36+
}
37+
if (yakinlik2 == yakinlik)
38+
Console.WriteLine(enyakin2);
39+
Console.WriteLine(enyakin);
40+
Console.ReadLine();
41+
}
42+
}
43+
}
37.4 KB
Loading

0 commit comments

Comments
 (0)