- 12 Ara 2007
- 849
- 4
daha önce yazdıklarımı biliyonuz artık neyse...
**************************************
using System;
using System.Collections.Generic;
using System.Text;
namespace Bul
{
class Program
{
static **** Main(string[] args)
{
int[] dizi ={ 3, 4, 5, 6, 7 };
int aranan;
Console.Write("aradığınız elemanı giriniz :");
aranan = Convert.ToInt16(Console.ReadLine());
bool b = false;
for (int i = 0; i < dizi.Length; i++)
{
if (dizi == aranan)
{
b = true;
}
}
if (b == true)
{
Console.WriteLine("Buldum");
}
else
{
Console.WriteLine("Bulamadım");
}
}
}
}
*****************************************
**************************************
using System;
using System.Collections.Generic;
using System.Text;
namespace Bul
{
class Program
{
static **** Main(string[] args)
{
int[] dizi ={ 3, 4, 5, 6, 7 };
int aranan;
Console.Write("aradığınız elemanı giriniz :");
aranan = Convert.ToInt16(Console.ReadLine());
bool b = false;
for (int i = 0; i < dizi.Length; i++)
{
if (dizi == aranan)
{
b = true;
}
}
if (b == true)
{
Console.WriteLine("Buldum");
}
else
{
Console.WriteLine("Bulamadım");
}
}
}
}
*****************************************