.


:




:

































 

 

 

 


math.lib




1

: Visual C++.

.

Visual C++

, Visual C++, . (project) , , . , , , .

:

File New;

Projects Win32 Console Application;

Project Name , LabRab11;

Location , ;

Win32 Console Application;

;

Win32 Console Application An empty project ( ) Finish;

New Project Information ( ) .

:

File New;

Files ++ Source File;

File name: . , , LabRab11;

.

:

( ) ;

Workspace, File View, Source Files;

Insert Files .

, , . .

dsw , .

dsp .

opt .

ncb .

cpp .

math.lib

(. 1) math.lib ( : #include math.h). . double ( abs(x))).

1

math.lib
   
Abs(x) ( !)
Acos(x)
Atan(x)
Atan2(x,y)
Ceil(x) , , ( )
Cos(x)
Cosh(x) x:
Exp(x)
Fabs(x)
Floor(x) , , x ( )

. 1

   
Fmod(xy) , x y
Log(x)
Log10(x)
Pow(x,y) x y
Sin(x)
Sinh(x) x:
Sqrt(x)
Tan(x)
Tanh(x) x

 

:

.

x=2.45, y=-0.423´10-2, z=1.232´103. h=6.9465.

:

 

#include <iostream.h>

#include <math.h>

int main()

{

double x,y,z,a,b,c,h;

cout << Vvedite x: ;

cin >> x;

cout << Vvedite y: ;

cin >> y;

cout << Vvedite z: ;

cin >> z;

a = pow(x,2*y)+exp(y-1);

b=1+x*fabs(y-tan(z));

c=10*pow(x,1/3)-log(z);

h=a/b+c;

cout << Result h= << h << endl;

return 0;

}





:


: 2016-11-24; !; : 730 |


:

:

- - , .
==> ...

1897 - | 1848 -


© 2015-2024 lektsii.org - -

: 0.009 .