Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Osnovy_programirovanniya_na_S_

.pdf
Скачиваний:
14
Добавлен:
02.02.2015
Размер:
3.52 Mб
Скачать

using System.Linq; using System.Text;

namespace ConsoleApplication1

{

 

 

class Example2

//

 

 

//

Example2

{

 

 

static void Main()

{

double p = 3.14159; double x = 2.5;

double y = Math.Cos(p * x)/(1 + x*x); Console.WriteLine();

Console.WriteLine(" x = {0} \t y = {1} ", x, y);

}

}

}

:

. Console.WriteLine() -

.

31

.

-

.

( ) ( ) -

. # .

-

. ,

Console,

System.

ReadLine, -

Console. -

,

(string).

:

static void Main()

{

string s = Console.ReadLine(); Console.WriteLine(s);

}

-

.

:

static void Main()

{

string s = Console.ReadLine();

int x = int.Parse(s); //

//

Console.WriteLine(x);

}

:

32

static void Main()

{

//

int x = int.Parse(Console.ReadLine()); Console.WriteLine(x);

}

int int.Parse(),

. , -

,

float.Parse() double.Parse(). , -

, -

System.FormatExeption (

).

WriteLine, Console,

. -

( 1.4):

1.4.

Console.WriteLine(x);

 

-

 

 

 

 

 

 

Console.WriteLine("x=" +

x

 

+"y=" + y);

 

,

 

 

-

 

 

"x=", -

 

 

 

33

 

x, " ="

 

 

 

 

Console.WriteLine("x={0}

 

y={1}", x, y);

,

 

 

 

,

 

{0}

 

x,

 

{1} –

 

 

WriteLine -

Write, .

.

, . -

-

, -

( , -

) ,

( , ). -

( 1.5):

1.5.

 

 

 

 

\a

 

 

 

\b

 

 

 

\f

 

 

 

 

 

 

 

\t

 

 

 

\v

 

 

 

\\

 

 

 

34

\n

 

\'

 

 

 

 

 

\r

 

\"

 

 

 

 

 

3. -

, . using System;

using System.Collections.Generic; using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

//

OperatingSystem os = System.Environment.OSVersion; Console.WriteLine("Platform: {0}",os.Platform); System.Console.WriteLine("The current date and time is " + System.DateTime.Now); //

System.Console.ReadLine();

}

}

}

35

4.

Y cos x

1 x2

using System;

using System.Collections.Generic; using System.Linq;

using System.Text; namespace lab0

{

class Program

{

static void Main(string[] args)

{

System.Console.WriteLine("The

current

date

and

time

is

"

+

System.DateTime.Now); double pi = 3.14159;

Console.WriteLine("Input x =\r");

double x = Convert.ToDouble(Console.ReadLine()); double y = Math.Cos(pi * x)/(1 + x*x); Console.WriteLine(" x = {0} \t y = {1} ",x,y);

36

Console.ReadKey();

}

}

}

2. .

1. , -

, -

( 3).

2.

,

Console.ReadLine() ( 4) . 1.6;.

1.6

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

A ln(4 x) 9

e sin(1,3x 0,7)

0,31

-0,0049

2,5

 

 

 

3

 

7

 

 

 

2

 

7

 

4

 

x

 

-0,75

-0,018

B (x

)

3

sine

arcsin(cos x)

1,2

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

C 3,7

5 xcos(3,5 x) 5 (5 x)3

2,23

-0,018

3,2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

37

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-0,35

-1,318

4

D e cos x

5

 

 

 

 

 

 

 

 

x

 

 

 

3

 

 

 

 

 

 

 

3 1,7arctg(

 

)sin1,7x

 

1,5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

0,40

0,016

 

E 6,3sin(1,3x ) x x 9

(x 7)

 

 

 

 

5

3

 

1,5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

4

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

x

7

 

 

 

 

 

 

 

 

2,26

0,235

6

F cos1,5x esin(x 3 )

 

 

 

 

 

 

 

 

 

1,2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

7

G 5 arctg

 

 

 

 

 

 

 

 

 

 

 

 

 

x

 

 

 

 

 

2,09

0,920

 

 

 

 

 

 

 

 

 

 

 

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2 cos2x e

 

 

 

 

 

 

 

 

 

 

 

1,7

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

H sinln(x 2) cos( ln(x

5

))

x

 

 

 

-0,26

-0,0049

 

 

 

 

 

 

 

 

0,25

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9

 

 

 

 

 

 

 

 

 

 

 

 

 

x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

x 5

 

-0,61

-0,012

I 4sin(15e

8

 

10,2) 9cose x

 

0,5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

10

 

4x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5

))

 

 

 

 

 

 

 

 

 

 

 

 

 

0,97

-0,0024

J e 5

2sin(7ln(x

 

 

 

 

 

 

 

 

 

 

 

 

 

-0,5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11

 

 

 

 

 

x

 

 

 

2 x

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

2,81

0,253

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

K 1,3e 2

cos(

1,4)

 

 

 

 

 

 

 

1,25

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

11

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12

L ln

 

4

 

 

 

sin arctgx

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2,03

1,043

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1,7

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13

 

 

x

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1,97

0,0017

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M e

arcsin cosx

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0,7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

sin(x 5)

 

 

 

 

x 7

 

0,96

-0,528

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14

F cos1,5x e

3

 

 

 

 

1,23

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

38

15

O arccos sin(3x 1,3) xearctgx 0,7

1,32

0,307

-0,5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16

P 1,3x 2,5sin(5

4 arctgx 0,7)

-0,71

0,0252

0,7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

17

 

x

 

 

 

 

 

 

 

 

 

 

x

2

 

 

 

 

 

 

 

 

 

 

-0,73

-4,197

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Q e 2cos(2x 0,3)

 

 

 

 

 

 

 

 

 

 

 

 

1,53

 

2,7 x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

18

 

e

x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2,15

-1,485

R

 

0,1 xcos(3x 1,5)

 

 

 

 

 

 

 

2

 

 

 

 

 

1,2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

19

S 5sin(x 0,3)

2 e x 0,1x2

 

 

 

 

 

0,62

-0,0082

 

 

 

 

 

1,1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20

T 20,7 (sin2 (1,2x) arccos

x

) e1,5x

2,07

-0,1699

 

 

 

1,35

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

21

U 1 sin

2x

cos

x

ln(

5

x)/1,5

 

 

 

0,69

0,0038

 

 

 

 

 

 

 

 

 

 

 

1,15

 

 

 

 

 

 

 

 

3

 

 

 

3

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

22

 

sin

2x

 

cos

x

 

4 x

 

 

 

 

 

1,28

-0,0009

V e

5 e

2

 

 

 

 

 

0,23

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

23

W 2sin 4,5x 0,2

 

(x 7)2 e

 

x

-0,63

6,0827

5

4

 

 

1,35

 

 

 

 

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

24

X cos(4ln(x

7

)) ln(4

x

)/3

4

 

1,78

0,0064

 

 

 

 

 

 

2,3

 

 

 

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

7

 

 

 

11

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

25

Y arcsin 1 x 1,5sin ln(x 4)

 

 

 

0,23

-0,0021

 

 

 

1,4

 

 

 

 

 

 

 

 

3

 

7

 

 

 

 

 

3

 

 

 

 

 

39

26

Z cos

x

e

(x 1)

2

 

 

4

 

 

 

 

 

 

 

 

 

 

-0,23

-1,0396

3

 

 

 

 

9

 

 

 

 

 

 

 

 

 

 

0,96

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

27

 

 

 

 

 

70

 

 

 

7

 

 

 

 

 

sin

2

(

2x

)

 

1,83

0,2601

A1

8x/(

 

7

x ) e

 

3

 

-0,5

 

 

 

 

 

 

 

 

 

 

3

6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

28

B1 15 (

1

x 3

 

 

 

 

 

x

 

 

 

 

 

0,47

-0,0073

 

x )/e

3

 

 

 

 

 

 

1,2

 

 

 

 

 

 

 

 

 

 

 

 

9

 

 

 

3

 

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

29

C1 ln(5 x) sin

 

7 x 1

 

 

 

 

 

0,66

-0,0001

 

 

 

 

 

 

-0,5

 

 

 

 

 

3

 

 

 

 

 

 

 

3

 

 

 

7

 

 

 

 

 

 

30

D1

1

e

cos2x

 

 

x

9

/(1

ln(x 3))

4

0,71

-0,0012

 

1,4

 

3

 

 

 

 

 

7

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

40

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]