-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMat_Quiz.cs
More file actions
91 lines (82 loc) · 2.87 KB
/
Copy pathMat_Quiz.cs
File metadata and controls
91 lines (82 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* ************************************************************************** */
/* */
/* */
/* Mat_oru.cs */
/* */
/* By: meralhamarat24@gmail.com */
/* */
/* ************************************************************************** */
using System;
class Program
{
static void Main()
{
Console.WriteLine("Matematik Testine Hoş Geldiniz!");
Console.WriteLine("Her sorunun cevabını girin. Hazır mısınız?\n");
int dogruSayisi = 0;
// Soru 1
Console.WriteLine("Soru 1: √144 kaçtır?");
double soru1Cevap = Convert.ToDouble(Console.ReadLine());
if (Math.Abs(soru1Cevap - 12) < 0.001)
{
Console.WriteLine("Doğru!");
dogruSayisi++;
}
else
{
Console.WriteLine("Yanlış. Doğru cevap: 12");
}
// Soru 2
Console.WriteLine("\nSoru 2: log₂8 kaçtır?");
double soru2Cevap = Convert.ToDouble(Console.ReadLine());
if (Math.Abs(soru2Cevap - 3) < 0.001)
{
Console.WriteLine("Doğru!");
dogruSayisi++;
}
else
{
Console.WriteLine("Yanlış. Doğru cevap: 3");
}
// Soru 3
Console.WriteLine("\nSoru 3: (2^3) x (3^2) kaçtır?");
int soru3Cevap = Convert.ToInt32(Console.ReadLine());
if (soru3Cevap == 72)
{
Console.WriteLine("Doğru!");
dogruSayisi++;
}
else
{
Console.WriteLine("Yanlış. Doğru cevap: 72");
}
// Soru 4
Console.WriteLine("\nSoru 4: 5! (5 faktöriyel) kaçtır?");
int soru4Cevap = Convert.ToInt32(Console.ReadLine());
if (soru4Cevap == 120)
{
Console.WriteLine("Doğru!");
dogruSayisi++;
}
else
{
Console.WriteLine("Yanlış. Doğru cevap: 120");
}
// Soru 5
Console.WriteLine("\nSoru 5: 2^4 - 2^3 + 2^2 - 2^1 kaçtır?");
int soru5Cevap = Convert.ToInt32(Console.ReadLine());
if (soru5Cevap == 10)
{
Console.WriteLine("Doğru!");
dogruSayisi++;
}
else
{
Console.WriteLine("Yanlış. Doğru cevap: 10");
}
// Test sonuçlarını göster
Console.WriteLine($"\nTesti tamamladınız! Toplam {dogruSayisi} soruya doğru cevap verdiniz.");
// Programın kapanmasını bekliyoruz
Console.ReadLine();
}
}