Bu örnekte değerlerini kullanıcıdan aldığımız 10 elemanlı bir dizinin ortalamasını hesaplayıp ekrana yazdıracağız.
namespace _50.DiziOrtalaması
{
class Program
{
static void Main(string[] args)
{
int[] dizi = new int[10];
int toplam = 0;
for (int i = 0; i < dizi.Length; i++)
{
Console.Write("Dizinin " + (i+1) + ". elemanını giriniz: ");
dizi[i] = Convert.ToInt32(Console.ReadLine());
toplam += dizi[i];
}
Console.WriteLine("Dizinin ortalaması = " + (toplam / 10));
Console.ReadLine();
}
}
}
For döngüsü yardımıyla dizinin tüm elemanlarına erişip, kullanıcıdan dizi elemanlarının değerlerini aldık.
13.satırda dizinin elemanlarını topladık ve 15.satırda da toplamı dizinin eleman sayısına bölerek ortalamasını hesaplamış olduk.
dizi.Length() metodu “dizi” adlı dizinin eleman sayısını döndürür.
Kodun ekran çıktısı da aşağıdaki şekildedir:
“dizi.length” dizinin eleman sayısını döndürür.
Kodun ekran çıktısı aşağıdaki gibidir:
39 Yorum
noroxin pills – buy noroxin online purchase confido pills
order speman pills – himplasia order online order fincar for sale
buy cheap generic finasteride – purchase uroxatral for sale buy alfuzosin tablets
buy hytrin 5mg generic – priligy 60mg cost order dapoxetine 30mg online
trileptal 300mg canada – cheap levothroid pill cheap levothroid for sale
purchase duphalac generic – buy lactulose bottles for sale buy betahistine 16 mg without prescription
buy cyclosporine for sale – cyclosporine us purchase colchicine online
buy generic calcort – alphagan online order buy alphagan generic
besifloxacin tubes – cost sildamax cheap sildamax tablets
purchase benemid pills – order monograph for sale purchase carbamazepine pills
neurontin 600mg tablet – buy neurontin 800mg online cheap azulfidine 500 mg ca
buy mebeverine 135 mg sale – order pletal 100mg buy generic cilostazol 100mg
26 Prospective data that allow direct comparison of the two breast cancer screening modalities in this patient population are lacking priligy canada
buy celebrex 200mg online – buy urispas online indocin ca
buy diclofenac 100mg pills – order voltaren 100mg online buy aspirin no prescription
purchase rumalaya generic – shallaki medication cost elavil
order pyridostigmine 60 mg for sale – order pyridostigmine generic order azathioprine sale
order diclofenac – oral voveran buy nimodipine tablets
buy baclofen 25mg for sale – generic baclofen 10mg where to buy piroxicam without a prescription
buy mobic – buy mobic medication buy toradol 10mg generic
order cyproheptadine 4mg pills – buy zanaflex without prescription cost zanaflex
oral artane – buy artane tablets diclofenac gel online order
buy cefdinir 300mg generic – buy cefdinir pills for sale cleocin for sale
brand accutane – deltasone 10mg canada deltasone 10mg pills
buy deltasone 20mg – buy zovirax cream for sale buy zovirax generic
purchase acticin cream – brand benzoyl peroxide generic retin
buy flagyl medication – cenforce 50mg usa cenforce 50mg canada
buy betamethasone creams – purchase adapalene for sale benoquin for sale
augmentin 1000mg pill – order augmentin 1000mg generic order synthroid 150mcg generic
cleocin 300mg cheap – order generic indomethacin indocin 75mg sale
The insights add so much value to the conversation. I always learn something new from you.
losartan ca – buy cephalexin pill cephalexin 500mg pills
purchase crotamiton for sale – crotamiton cheap order aczone generic
bupropion 150mg drug – ayurslim generic cheap shuddha guggulu generic
modafinil 200mg cheap – buy promethazine pills buy generic meloset 3 mg
progesterone tablet – buy clomiphene tablets purchase clomiphene for sale
where to buy aygestin without a prescription – careprost buy online buy generic yasmin
Drug therapy had the best reported outcomes of treatments included in the survey priligy where to buy JAMA 1997, 278, 399 411
buy generic cabergoline 0.5mg – purchase cabgolin generic cheap alesse generic