Jump to content

C# Diziler Yapamadıgım Program


Enes199oban
 Share

Recommended Posts

  • Editor

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();
 
        }
    }
}
 
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...