Saturday, November 10, 2018

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

{

class Program


{

static void Main(string[] args)

{

double v;
double r;
double i;
double y = 0;
int m=0;
while (y < 6)

{
y++;

Console.WriteLine("plz enter the voltage");
v = double.Parse(Console.ReadLine());
Console.WriteLine("plz enter the resgitar");
r = double.Parse(Console.ReadLine());

i = v / r;

if (i > 2)

{
m++;
}
}

Console.WriteLine("number of times" +m);







Console.ReadKey();

}
}
}


Monday, October 22, 2018

int a, b;
            int m = 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){
                m++;
                else
                Console.WriteLine("the first num bigger than the second num ");
            }
            if (a<b){
                Console.WriteLine("the second num bigger than the first num ");
            }
            else
                Console.WriteLine(a=b);
        }
        Console.WriteLine("the num of time a is bigger than b"+ m);
        Console.ReadKey();
    }

Saturday, October 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 ball;
            int m;

            Console.WriteLine("plz enter number the ball");
            ball = int.Parse(Console.ReadLine());
            m = ball / 20;

            if (ball > m)
                Console.WriteLine("the plus " + (m + 1));
else 
console.write line (c);
            Console.ReadKey();


        }
    }
}

Monday, June 4, 2018

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

namespace ConsoleApplication21
{
    class Program
    {
        static void Main(string[] args)
       
            double v;
            double r1;
            double r2;
            double i;
            double i1;
            double i2;
            double rt;
            Console.WriteLine("plz enter voltage");
            v = double.Parse(Console.ReadLine());
            Console.WriteLine("plz enter r1");
            r1 = double.Parse(Console.ReadLine());
            Console.WriteLine("plz enter r2");
            r2 = double.Parse(Console.ReadLine());
            rt = 1 / (1 / r1 + 1 / r2);
            i = v / rt;
            i1 = v / r1;
            i2 = v / r2;
        Console.writeline(" the rt is    "+rt + "ohm     "+"the curnet is    "+i+ "amper    "+"the v1 is      "+v1+ " volt     "+"the v2 is    "+v2+ " volt    ");
        Console.readkey;

    }    
    }
}