Инженерия факультеті компьютерлік инженерия кафедрасы н. М. Жунисов Visual Studio. Net



бет3/19
Дата06.01.2022
өлшемі0,98 Mb.
#15027
1   2   3   4   5   6   7   8   9   ...   19
: Тапсырмалар.


Нұсқа

Тапсырмалар

1

x,y айнымалылары берілген. Ең үлкенін табу керек.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;
namespace ConsoleApplication3

{

class Program



{

static void Main()

{

double x;



double y;

double max;

Console.WriteLine("Vvedite x:");

x =double.Parse(Console.ReadLine());

Console.WriteLine("Vvedite y:");

y = double.Parse(Console.ReadLine());

if (x > y) max = x; else max = y;

Console.WriteLine("max="+max);

Console.ReadLine();

}

}



}

2

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;
namespace ConsoleApplication5

{

class Program



{

static void Main(string[] args)

{

double z1;



double z2;

double x;

Console.WriteLine("Vvedite x:");

x = double.Parse(Console.ReadLine());

z1 = (Math.Sin(x) + Math.Cos(x)) / (Math.Cos(x) - Math.Sin(x));

z2 = (Math.Sqrt(2) * Math.Sin(x / 2)) / 2;

Console.WriteLine("z1=" + z1);

Console.WriteLine("z2=" + z2);

Console.ReadLine();

}

}



}



3

Егер x берілген болса, онда 1-2x+3 x2-4 x3 және 1+2x+3 x2-4 x3 өрнегін есептеп шығарыңдар

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;
namespace ConsoleApplication6

{

class Program



{

static void Main(string[] args)

{

double x, y,z;



Console.WriteLine("Vvedite x:");

x = double.Parse(Console.ReadLine());

y = 1 - 2 * x + 3 * x * x - 4 * x * x * x;

z=1+2*x+3*x*x-4*x*x*x;

Console.WriteLine("y="+y);

Console.WriteLine("z=" + z);

Console.ReadLine();

}

}



}



4

Тіктөртбұрыштың периметрін есептеу программасын құрыңдар

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;
namespace ConsoleApplication4

{

class Program



{

static void Main(string[] args)

{

double a;



double b;

double p;

Console.WriteLine("Vvedite a:");

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

Console.WriteLine("Vvedite b:");

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

p = (a + b) * 2;

Console.WriteLine("p="+p);

Console.ReadLine();

}

}



}



5

Берілген формулалар бойынша есептеулер жүргізу

А=(x3+sin(xy)+y3)/(cos(ln x+1))

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;


namespace _2zert_5

{

class Program



{

static void Main(string[] args)

{

double A;



double x;

double y;

Console.WriteLine("Vvedite x:");

x = double.Parse(Console.ReadLine());

Console.WriteLine("Vvedite y:");

y = double.Parse(Console.ReadLine());

A = (x * x * x + Math.Sin(x * y) + y * y * y) / (Math.Cos(Math.Log10(x) + 1));

Console.WriteLine("A=" + A);

Console.ReadLine();

}

}



}


Сұрақтарға жауап беру



  1. Math класы дегеніміз не?

  2. Берілген санды қалай дөңгелектейміз?

  3. Статистикалық әдістерді ата?

  4. Енгізу шығару операторларының жалпы жазылу түрі.

  5. Сызықтық бағдарлама дегеніміз не?





Достарыңызбен бөлісу:
1   2   3   4   5   6   7   8   9   ...   19




©emirsaba.org 2024
әкімшілігінің қараңыз

    Басты бет