using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OrtalamaHesabı { class Program { static void Main(string[] args) { int secenek, devam = 1; List<int> notlar = new List<int>(); int sonuc = 0; while (devam == 1) { Console.WriteLine(); Console.WriteLine("Add number ==>"); notlar.Add(int.Parse(Console.ReadLine())); Console.WriteLine("Add number->1 ,Take arithmatic average ->2, Exit ->3"); secenek = int.Parse(Console.ReadLine()); if (secenek == 3) devam = 0; if (secenek == 2) { } } } } }
using System.Linq; //... sonuc = notlar.Sum();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)