using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
int tutulan, tahmin, kacdefa = 1;
Random a = new Random();
tutulan = a.Next(1, 1000);
for (int i = 0; i >= 0; i++)
{
Console.Write("Tahmininiz(1-1000) : ");
tahmin = int.Parse(Console.ReadLine());
if (tahmin == tutulan)
{
Console.WriteLine("Tebrikler {0} denemede buldunuz..", kacdefa);
break;
}
else if (tahmin < tutulan)
Console.WriteLine("Daha Büyük Bir Sayı Girin");
else
Console.WriteLine("Daha Küçük Bir Sayı Girin");
kacdefa++;
}
Console.ReadKey();
}
}
}
SEARCH
SON PAYLAŞIMLAR
3-latest-65px
ETİKETLER
- 5. Sınıf 1. Dönem (8)
- 5. Sınıf BTY (8)
- 6. Sınıf BTY (1)
- Kişisel (3)
- Lise (9)
- Scratch (11)
- Üniversite - C# (39)
Hiç yorum yok:
Yorum Gönder