Enes199oban Posted March 3, 2013 Share Posted March 3, 2013 merhaba arkadaşar ben console applicitionda rasgele üretilen 10 adet sayıyı diziye aktaran ve bu sayıların ortalamasını bulan ve üretilen 10 sayıdan ortalamadan büyük olan sayıları yazdıran program lazım acil yapamadım Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted March 3, 2013 Editor Share Posted March 3, 2013 Console olması şartmı kardeşim. Quote Link to comment Share on other sites More sharing options...
Enes199oban Posted March 3, 2013 Author Share Posted March 3, 2013 evet malesef bunun üzerinden yapıyoruz sabaha lazım hadi hayırlısı Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted March 3, 2013 Editor Share Posted March 3, 2013 Al kardeşim bi örnek hazırladım. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Random rnd = new Random(); List<int> list = new List<int>(); for(int runs = 0; runs < 10; runs++) { list.Add(rnd.Next(1,100)); } int ortalama; int sayi; int test = 0; for (sayi = 0; sayi < 10;sayi++ ) { test = test + list[sayi]; } ortalama = test / 10; Console.WriteLine("Ortalama " + ortalama.ToString()); for (sayi = 0; sayi < 10; sayi++) { if (list[sayi] > ortalama) { Console.WriteLine("Ortalamadan Büyük " + list[sayi].ToString()); } } Console.ReadKey(); } } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.