C# dasturlash tilida juft va toq sonlarni topish dasturi



C# dasturlash tilida juft va toq sonlarni topuvchi dasturni ko'rib chiqamiz


Dastur kodi :




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ITUZBLOGSPOTCOM
{
    class Program
    {
        static void Main(string[] args)
        {
            int i;
            Console.Write(“Son kiriting : ");
            i = int.Parse(Console.ReadLine());

            if (i % 2 == 0)
                Console.Write(i+" soni juft son");
            else
                Console.Write(i+" soni toq son ");

            Console.Read();
        }
    }
}


Keyingi dastur kodlarida ko'rishguncha!  ;)

Comments

Popular posts from this blog