الاثنين، 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();

            
                
        }
    }
}

khaldon asfor
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 x, y, z;
            Console.WriteLine("plz enter num bolls");
            x = int.Parse(Console.ReadLine());
            y = x / 20;
            z = x % 20;
            if (z > 0)
            {
                Console.WriteLine(" num bags is" + (y + 1));
            }

            else
            {
                Console.WriteLine(" num bags is" + y);
            }
                Console.ReadKey();
                
            
                
        }
    }
}

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

خلدون عصفور 
برنامج يقوم المستخدم به بادخال رقمين ويختار العمليه التي يريدها والبرنامج يقوم بطباعه الجواب


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

namespace ConsoleApplication8
{
    class Program
    {
        static void Main(string[] args)
        {
            int a,b,c ;
           
            Console.WriteLine ("plz enter num1");
           a=int.Parse(Console.ReadLine());
           Console.WriteLine("plz enter num2");
           b = int.Parse(Console.ReadLine());
            Console.WriteLine("press 1 for addition +");
            Console.WriteLine("press 2 for multipication *");
            Console.WriteLine("press 3 for subtract -");

            c = int.Parse(Console.ReadLine());
            switch (c)
            {
                case 1:
                    Console.WriteLine("the result is" + (a + b));
                    break;
                case 2:
                    Console.WriteLine("the result is" + (a * b));
                    break;
                case 3:
                    Console.WriteLine("the result is" + (a - b));
                    break;
            }
                    Console.ReadKey();
    }
    }
}

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

khaldon asfor
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 m, b, c, a , average ;
            Console.WriteLine("plz enter the grade of math");
                m= double.Parse(Console.ReadLine());
            if(m==100)
                Console.WriteLine("math ideal");
            if (m >90 && m<100)
                Console.WriteLine("math exellent");
            if (m > 80 && m < 89)
                Console.WriteLine(" math very good");
            if (m > 70 && m < 79)
                Console.WriteLine("math good");
            if (m > 60 && m < 69)
                Console.WriteLine("math satisfaction");
            if (m >= 50 && m < 59)
                Console.WriteLine("math bad");
            if (m < 50)
                Console.WriteLine("math fail");

            Console.WriteLine("plz enter the grade of biolige");
           b = double.Parse(Console.ReadLine());
           if (b == 100)
               Console.WriteLine("biolige ideal");
           if (b > 90 && b < 100)
               Console.WriteLine("biolige exellent");
           if (b > 80 && b < 89)
               Console.WriteLine("biolige very good");
           if (b > 70 && b < 79)
               Console.WriteLine("biolige good");
           if (b > 60 && b < 69)
               Console.WriteLine("biolige satisfaction");
           if (b >= 50 && b < 59)
               Console.WriteLine("biolige bad");
           if (b < 50)
               Console.WriteLine("biolige fail");

           Console.WriteLine("plz enter the grade of chemistry");
          c= double.Parse(Console.ReadLine());
           if (c == 100)
               Console.WriteLine("chemistry ideal");
           if (c > 90 && c < 100)
               Console.WriteLine("chemistry exellent");
           if (c > 80 && c < 89)
               Console.WriteLine("chemistry very good");
           if (c > 70 && c < 79)
               Console.WriteLine("chemistry good");
           if (c > 60 && c < 69)
               Console.WriteLine("chemistry satisfaction");
           if (c >= 50 && c < 59)
               Console.WriteLine("chemistry bad");
           if (c < 50)
               Console.WriteLine("chemistry fail");
           a = m + b + c;
           average = a / 3;
           Console.WriteLine(" average is" + average);

           if (average == 100)
               Console.WriteLine("average ideal");
           if (average > 90 && average < 100)
               Console.WriteLine("average exellent");
           if (average > 80 && average < 89)
               Console.WriteLine("average very good");
           if (average > 70 && average < 79)
               Console.WriteLine("average good");
           if (average > 60 && average < 70)
               Console.WriteLine("average satisfaction");
           if (average > 50 && average < 59)
               Console.WriteLine("average bad");
           if (average < 50)
               Console.WriteLine("average fail");
           Console.ReadKey();
        }
    }
}

khaldon asfor
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 m, b, c, a , average ;
            Console.WriteLine("plz enter the grade of math");
                m= double.Parse(Console.ReadLine());
            if(m==100)
                Console.WriteLine("math ideal");
            if (m >90 && m<100)
                Console.WriteLine("math exellent");
            if (m > 80 && m < 89)
                Console.WriteLine(" math very good");
            if (m > 70 && m < 79)
                Console.WriteLine("math good");
            if (m > 60 && m < 69)
                Console.WriteLine("math satisfaction");
            if (m > 50 && m < 59)
                Console.WriteLine("math bad");
            if (m < 50)
                Console.WriteLine("math fail");

            Console.WriteLine("plz enter the grade of biolige");
           b = double.Parse(Console.ReadLine());
           if (b == 100)
               Console.WriteLine("biolige ideal");
           if (b > 90 && b < 100)
               Console.WriteLine("biolige exellent");
           if (b > 80 && b < 89)
               Console.WriteLine("biolige very good");
           if (b > 70 && b < 79)
               Console.WriteLine("biolige good");
           if (b > 60 && b < 69)
               Console.WriteLine("biolige satisfaction");
           if (b > 50 && b < 59)
               Console.WriteLine("biolige bad");
           if (b < 50)
               Console.WriteLine("biolige fail");

           Console.WriteLine("plz enter the grade of chemistry");
          c= double.Parse(Console.ReadLine());
           if (c == 100)
               Console.WriteLine("chemistry ideal");
           if (c > 90 && c < 100)
               Console.WriteLine("chemistry exellent");
           if (c > 80 && c < 89)
               Console.WriteLine("chemistry very good");
           if (c > 70 && c < 79)
               Console.WriteLine("chemistry good");
           if (c > 60 && c < 69)
               Console.WriteLine("chemistry satisfaction");
           if (c > 50 && c < 59)
               Console.WriteLine("chemistry bad");
           if (c < 50)
               Console.WriteLine("chemistry fail");
           a = m + b + c;
           average = a / 3;
           Console.WriteLine(" average is" + average);

           if (average == 100)
               Console.WriteLine("average ideal");
           if (average > 90 && average < 100)
               Console.WriteLine("average exellent");
           if (average > 80 && average < 89)
               Console.WriteLine("average very good");
           if (average > 70 && average < 79)
               Console.WriteLine("average good");
           if (average > 60 && average < 70)
               Console.WriteLine("average satisfaction");
           if (average > 50 && average < 59)
               Console.WriteLine("average bad");
           if (average < 50)
               Console.WriteLine("average fail");
           Console.ReadKey();
        }
    }
}

الأربعاء، 10 أكتوبر 2018

khaldon asfor
tawfiq mitwalli


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

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = 33;
            if (x==8)
              
                    Console.WriteLine("value of x is 8");
                else if(x==18)
                Console.WriteLine("value of x is 18");
            else if (x==33)
                Console.WriteLine("value of x is 33");
                else
                    Console.WriteLine("no match");
            Console.ReadKey();
        }
    }
}
    
khaldon asfor
tawfiq mitwalli

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

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int age = 17;
            if (age > 14)
                if (age > 18)
                    Console.WriteLine("adult");
                else
                    Console.WriteLine("teenager");
            else
                if (age > 0)
                    Console.WriteLine("child");
                else
                    Console.WriteLine("something wrong");
            Console.ReadKey();
        }
    }
}
    
khaldon asfor
tawfiq mitwalli

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

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int mark = 100;
            if (mark >= 50)
                Console.WriteLine("you passed");
            if (mark == 100)
                Console.WriteLine("perfect");
            else
                Console.WriteLine("you fallied");
            Console.ReadKey();
        }
    }
}
    
khaldon asfor
tawfiq mitwale

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

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
           int a = 4 ;
            int b = 4 ;
            if (a==b)
            {
                Console.WriteLine("EQUAL");
            }
            Console.ReadKey();
        }
    }
}

1)khaldon asfor
tawfiq mitwalli

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

namespace ConsoleApplication5
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = 8;
            int y = 3;
            if (x > y)
                Console.WriteLine("is greater then y");
            Console.ReadKey();
        }
    }
}



(2



الاثنين، 8 أكتوبر 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;
           
            
                Console.WriteLine("plz enter num ");
                a= int.Parse(Console.ReadLine());

                b = a % 10;
                c = a / 100;
                if (c == b)

              Console.WriteLine("this number is panglaogy ");

                else

                    Console.WriteLine("this number is not panglaogy ");

                Console.ReadKey();
        }
    }
}