السبت، 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();
        }

    }
}