السبت، 19 يناير 2019

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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b;
            double c;
            int q = 0;
            double sum = 0;
            Console.WriteLine(" enter the num of the battres");
            a = int.Parse(Console.ReadLine());


            while (a > 10)
            {
                q++;
                Console.WriteLine(" enterthe haw much battry you need");
                b = int.Parse(Console.ReadLine());
                if (b > 10)
                {
                    Console.WriteLine("try agan");
                }
                c = b * 2.5;
                Console.WriteLine("the prese is" + c);

                a = a - b;
                sum = c + sum;

            }
            Console.WriteLine("the numbers of people how buy is" + q);
            Console.WriteLine("the total mony is" + sum);

            Console.ReadKey();
        }
    }
}

السبت، 10 نوفمبر 2018

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

namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            double rsistor;
            double volt, I;
            int a=0;
            int d=0;
            while (a++ < 6){
            
                Console.WriteLine("plz enter the value rsistor");
                rsistor = double.Parse(Console.ReadLine());

                Console.WriteLine("plz enter the value volt");
                volt = double.Parse(Console.ReadLine());
                I = volt / rsistor;
                if (I >= 2)  {
                    d++;
                }
            }
                Console.WriteLine("the digital of times I>=2 is" + d);
            

     
           Console.ReadKey();
        }
    }
}

الاثنين، 5 نوفمبر 2018

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

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            int x;
            int z = 0;
            Console.WriteLine(" plz enter the num");
            x = int.Parse(Console.ReadLine());

            while (x!=0)
            {

                z++;
                x = x / 10;
            }
            Console.WriteLine(" The num of digits is = " + z);


            Console.ReadKey();
        }

    }
}

الاثنين، 22 أكتوبر 2018

using System;



using System.Collections.Generic;



using System.Linq;



using System.Text;



using System.Threading.Tasks;




namespace ConsoleApplication2
{



    class Program
    {


        static void Main(string[] args)
        {


            int a, c, b;

            int e = 0;
            int y = 0;
            int x = 0;
            int num = 1;

            while (num++ < 5)
            {


                Console.WriteLine("plz enter the first num  ");



                a = int.Parse(Console.ReadLine());

                Console.WriteLine("plz enter  the second num  ");



                b = int.Parse(Console.ReadLine());




                if (a > b)
                {
                    Console.WriteLine("the first num bigger than the second num  ");
                  
                    e++;

                }




                else if (a == b)
                {
                    Console.WriteLine("the first num equel the second num  ");
                    
                    x++;

                }


                else
                {
                    Console.WriteLine("the second num bigger than the first num  ");
                 

                    y++;

                }


            }


            Console.WriteLine("the times that a>b = " + e);
            Console.WriteLine("the times that a<b = " + y);
            Console.WriteLine("the times that a=b = " + x);
            Console.ReadKey();
        }


    }
}

السبت، 20 أكتوبر 2018

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

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = 0;
            while(++num < 6)
           
                Console.WriteLine(num);
             
                Console.ReadKey();
            
                
        }
    }
}

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

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = 1;
            while(num < 6)
            {
                Console.WriteLine(num);
                num+=2;
            }
            Console.ReadKey();

            
                
        }
    }
}

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

namespace ConsoleApplication9
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = 1;
            while(num < 6)
            {
                Console.WriteLine(num);
                num++;
            }
            Console.ReadKey();

            
                
        }
    }
}