Klavyeden Girilen 10 Tane Sayının 10'a Tam Bölünenlerini Ve Üç Basamaklı Olanlarını Yazan Program

using System.Collections;  isim alanını ekliyoruz.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            ArrayList ary = new ArrayList();
            for (int i = 1; i <= 10; i++)
            {
                Console.Write("Sayı girin :");
                int x = Convert.ToInt32(Console.ReadLine());
                if (x % 10 == 0 && (x >= 100 && x <= 999))
                {
                    ary.Add(x);
                }
            }
            foreach (var k in ary)
            {
                Console.WriteLine(k);
            }
        }
    }
}

Yorum Gönder

0 Yorumlar