, - , , , , : .
?
, . , , , , - .
?
_ '&', :
int& float& char&
int, float, char.
, . , .
( ) , . !
:
int a = 3, b = 4;
float f;
char s1,s2;
a, f, s2 () :
int& aNew = a;
float& F = f;
char& ss2 = s2;
. .
aNew = b; f = 1.77; F = f - 1; ss2 = w; s1 = s2;
. ? .
2, .
countX, , , b , ( ).
main a, , . countX, X .
main .
, , countX , b , float. , void. x, float&.
, , .
|
|
float
float b void
float c
float& x
countX, , :
float countX (float a, float b, float c, float& x)
example3.cpp
Define _USE_MATH_DEFINES
#include <math.h>
#include <iostream>
#include <conio.h>
using namespace std;
void countX (float a, float b, float c, float& x)
{
x= (a * cos(b + c) - b * sin(a + c)) / (pow(a,3) + b * b);