.


:




:

































 

 

 

 


1.




1. . . ++

2. .. . /++

3. .

4. .. , .. /C++ .

5. .. , .. , ... ++ - .

6. . . /++

7. .. . 10-11

 

 

1. .. , .. , ..

.

:

2. .. , .. , ..

. \

: .

3. .. , .. , .. , ..

.

1.

4. .. , .. , .. , ..

.

2.

5. .. , .. , .. , ..

.

3.

6. .. , .. , .. , ..

.

4.

1

C++

( .

1, - )

 

 

:1/3*π*R2*h

π =pi=3.14

 

#include<iostream.h> // cin cout

const double pi=3.14;

void main() // .

{

double V, h, R; //

cout<<Enter R= ; //

cin>>R; //

cout<<Enter h= ; //

cin>>h; //

V=R*R*h*pi/3;//

out<<V=<<V<<endl; // ( )

}

 

.

 

  1. #include<iostream.h>

++

( .h), , .

#include<iostream.h> - . include

h iostream . iostream.h ++ . cin cout

 

  1. const double pi=3.14;

pi

 

3/ void main()

void ( ... )

main- . ++- main()

4. {

{ -

{

}

5. double V, h, R;

 

6. cout<<Enter R= ;

<<Enter R= . Enter R=. <</

, , , . cout (consol output),

.

7. cin>>R;

cin , .

>> - ++

R , .

 

8. V=R*R*h*pi/3

.

R*R*h*pi/3 V (, V R*R*h*pi/3)

 

9. }

} .

 

: ;

 

 

++

, , ++ ++. ++ : , ++.

C++

- Borland C++ Builder,

- Microsoft Visual Studia C++ 6

- Microsoft Visual Studia 2010 Express

- Microsoft Visual C++.NET

( Windows)

- GNU C++ Linux ( Unix )

 

++ :

 

 

 

1.

 

2. .

 

3.

 

4. ( )

 

5. .

 

6. , .

 

1.

 

.

++ ( ) , , . ++ .cpp,.cxx,.C, , ++





:


: 2016-12-06; !; : 409 |


:

:

! . .
==> ...

1663 - | 1450 -


© 2015-2024 lektsii.org - -

: 0.021 .