- 12 Ara 2007
- 849
- 4
arkadaşlar virüs mirüs kodu öğrenelim derken bizi baya sardı bu c# muhabbeti . şimdi ben size c# 2.0 da derlediğim vize, final ortalamasının bulunması metodunu sunuyorum ....
neyse.........................
***********************************
using System;
using System.Collections.Generic;
using System.Text;
namespace NotOrtlamasi
{
class Program
{
static **** Main(string[] args)
{
string[] isimler = new string[5];
int[] vizeler = new int[5];
for (int i = 0; i < isimler.Length; i++)
{
Console.Write("isim :");
isimler = Console.ReadLine();
Console.Write("Vize :");
vizeler = Convert.ToInt16(Console.ReadLine());
}
int toplam = 0;
for (int i = 0; i < vizeler.Length; i++)
{
toplam += vizeler;
}
int ortalama = toplam / vizeler.Length;
Console.WriteLine("Sınıfın Ortalaması : {0}", ortalama);
}
}
}
**************************************
neyse.........................
***********************************
using System;
using System.Collections.Generic;
using System.Text;
namespace NotOrtlamasi
{
class Program
{
static **** Main(string[] args)
{
string[] isimler = new string[5];
int[] vizeler = new int[5];
for (int i = 0; i < isimler.Length; i++)
{
Console.Write("isim :");
isimler = Console.ReadLine();
Console.Write("Vize :");
vizeler = Convert.ToInt16(Console.ReadLine());
}
int toplam = 0;
for (int i = 0; i < vizeler.Length; i++)
{
toplam += vizeler;
}
int ortalama = toplam / vizeler.Length;
Console.WriteLine("Sınıfın Ortalaması : {0}", ortalama);
}
}
}
**************************************