• 7-Laboratoriya. Math kutubxonasi. Math kutubxonasi funksiyalari yordamida chiziqli-matematik misollarning dasturini tuzish.
  • -Laboratoriya. C# dasturlash tilida razryadli va mantiqiy amallarga oid masalalarni yechish




    Download 5,29 Mb.
    bet123/154
    Sana08.01.2024
    Hajmi5,29 Mb.
    #131939
    1   ...   119   120   121   122   123   124   125   126   ...   154
    Bog'liq
    Majmua

    6-Laboratoriya. C# dasturlash tilida razryadli va mantiqiy amallarga oid masalalarni yechish.


    Topshiriqlar


    Berilganlar: x=14.26,y=-1.22, z=3.510-2,

    Natija: t=0.564849


    Berilganlar: x=3.74x10-2,
    y=-0.825,z=0.16x102,

    Natija: v=1.0553


    Berilganlar: x=-4.5,y=0.75x10-4, z=0.845x102,
    .
    Natija: u=-55.6848


    Berilganlar: x=0.4x104,y=-0.875,
    z=-0.475x10-3 ,
    Natija: w=1.9873


    Berilganlar: x=-15.246,y=4.642x10-2, z=20.001x102,
    .
    Natija: =-182.036


    Berilganlar:x=16.55x10-3,y=-2.75, z=0.15,

    Natija: =-38.902


    Berilganlar: x=0.1722, y=6.33, z=3.25x10-4 ,

    Natija: =-172.025


    Berilganlar: x=-2.235x10-2, y=2.23, z=15.221

    Natija: =39.374


    Berilganlar: x=1.825x102,y=18.225,
    z=-3.298x10-2,

    Natija: =1.2131


    Berilganlar: x=3.981x10-2,
    y=-1.625x103, z=0.512.

    Natija: a=1.26185


    Berilganlar: x=6.251,y=0.827, z=25.001,

    Natija: b=0.7121


    Berilganlar: x=3.251,y=0.325, z=0.466x10-4,

    Natija: c=4.025


    Berilganlar: x=17.421, y=10.365x10-3, z=0.828x105,

    Natija: f=0.33056


    Berilganlar: x=12.3x10-1, y=15.4, z=0.252x103,

    Natija: g=82.8257


    Berilganlar: x=2.444,y=0.869x10-2, z=-0.13x103,
    Natija: h=-0.49871


    Berilganlar: x=-1,y=-1,z=3

    Natija: a=0.2366935; b=-1.384381


    Berilganlar: x=1, y=1, z=3

    .
    Natija: a=9.608184; b=2.962605


    Berilganlar: x=3,y=4,z=5

    Natija: a =-1.467187; b=4.125




    Berilganlar: x=3,y=4,z=5,

    Natija: a=3.288716; b=0.9615385




    Berilganlar: x=5,y=4.5,z=0.5,


    Natija: a=8.46425e-10, b= -1.29084


    7-Laboratoriya. Math kutubxonasi. Math kutubxonasi funksiyalari yordamida chiziqli-matematik misollarning dasturini tuzish.
    Misol.1. Umumiy matematika funksiyalari uchun
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace Math_Example


    {
    class Program
    {
    static void Main(string[] args)
    {
    double a, b, c;
    int s;
    a = Convert.ToDouble(Console.ReadLine());
    b = Convert.ToDouble(Console.ReadLine());
    c = Convert.ToDouble(Console.ReadLine());
    s = Int32.Parse(Console.ReadLine());
    Console.WriteLine(Math.Abs(-a));
    Console.WriteLine(Math.Acos(a - b * c));
    Console.WriteLine(Math.Asin(b - a * c));
    Console.WriteLine(Math.Atan(-c));
    Console.WriteLine(Math.Atan2(a,b));
    Console.WriteLine(Math.BigMul((int)a, (int)b));
    Console.WriteLine(Math.Ceiling(c));
    Console.WriteLine(Math.Cos(a - b));
    Console.WriteLine(Math.Cosh(c + a));
    Console.WriteLine(Math.DivRem((int)a, (int)b,out s));
    Console.WriteLine(Math.Exp(s));
    Console.WriteLine(Math.Floor(a));
    Console.WriteLine(Math.IEEERemainder(a, b));
    Console.WriteLine(Math.Log(a));
    Console.WriteLine(Math.Log10(a));
    Console.WriteLine(Math.Max(a, b));
    Console.WriteLine(Math.Min(a, b));
    Console.WriteLine(Math.Pow(b, c));
    Console.WriteLine(Math.Round(a));
    Console.WriteLine(Math.Sign(c + b));
    Console.WriteLine(Math.Sin(c));
    Console.WriteLine(Math.Sqrt(a));
    Console.WriteLine(Math.Tan(c));
    Console.WriteLine(Math.Tanh(s));
    Console.WriteLine(Math.Truncate(-c));
    Console.ReadKey();
    }
    }
    }

    Misol.2. 2 ta katta int turi bilan ishlash


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

    namespace Math_Example


    {
    class Program
    {
    static void Main(string[] args)
    {
    BigInteger a, b, add, sub, mul, div;
    a = BigInteger.Parse(Console.ReadLine());
    b = BigInteger.Parse(Console.ReadLine());
    add = BigInteger.Add(a, b);
    sub = BigInteger.Subtract(a, b);
    mul = BigInteger.Multiply(a, b);
    div = BigInteger.Divide(a, b);
    Console.WriteLine("2 ta sonning yig'indisi {0} \n ayirmasi {1} \n ko'paytmasi {2} \n bo'linmasi {3}", add, sub, mul, div);
    Console.ReadKey();
    }
    }
    }



    Download 5,29 Mb.
    1   ...   119   120   121   122   123   124   125   126   ...   154




    Download 5,29 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    -Laboratoriya. C# dasturlash tilida razryadli va mantiqiy amallarga oid masalalarni yechish

    Download 5,29 Mb.