.


:




:

































 

 

 

 





using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

 

namespace ConsoleApplication_Lab1

{

class Program

{

static void Main(string[] args)

{

double x, y, x1, y1, y11, y22;

bool w;

Console.WriteLine(" x");

x = Convert.ToDouble(Console.ReadLine());

y = Math.Pow(2, -x) * Math.Sqrt(x + Math.Pow(Math.Abs(x), 1 / 3));

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

y11 = Math.Truncate(y);

y22 = Math.Round(y);

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

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

Console.WriteLine(" x1");

x1 = Convert.ToDouble(Console.ReadLine());

Console.WriteLine(" y1");

y1 = Convert.ToDouble(Console.ReadLine());

// , (x1,y1)

w = x1 * x1 + y1 * y1 <= 1 &!(y1 < 0 & y1 > -x1);

Console.WriteLine(" x1={0}, y1={1} w={2}", x1, y1, w);

Console.ReadLine();

FileStream s = new FileStream("rez.txt", FileMode.Create);

StreamWriter Wr = new StreamWriter(s);

Wr.WriteLine(" x={0} y={1}", x, y);

Wr.WriteLine(" x={0} y=y11={1}", x, y11);

Wr.WriteLine(" x={0} y=y22={1}", x, y22);

Wr.WriteLine(" x1={0}, y1={1} w={2}", x1, y1, w);

Wr.Close();

s.Close();

}

}

}

.

 

4. ( rez.txt)

x=1,5 y=0,559016994374947

x=1,5 y=y11=0

x=1,5 y=y22=1

x1=-0,5, y1=0,1 w=True

________________________________________________________________





:


: 2015-01-25; !; : 386 |


:

:

, .
==> ...

1375 - | 1150 -


© 2015-2024 lektsii.org - -

: 0.009 .