.


:




:

































 

 

 

 


() .




 

() -.

, , , . , , .

, , , , , . { }.

 

. , , . , .

, , . , .

, , , . , , : countX, main.

 

 

// example1.cpp countX, main

Define _USE_MATH_DEFINES

#include <math.h>

#include <iostream>

#include <conio.h>

using namespace std;

float countX (float a, float b, float c)

{

float x;

x= (a * cos(b + c) - b * sin(a + c)) / (pow(a,3) + b * b);

return x;

}

// --

void main (void)

{

out << endl << "vvedite a, x1, x2 ";

float x1, a, x2;

cin>>a>>x1>>x2;

float vir1;

vir1 = countX (x1*x1, x2, M_PI_2); // countX

float vir2;

vir2 = countX (x2, x1 + 1.2, 0); // countX

float x = 1./11 + a * vir1 + 1 / vir2;

cout << endl << "X = " << x;

getch();

}

// --

 

countX ( ).

. , countX, .

, example2.cpp. countX , .

 

// example2.cpp

// , main

Define _USE_MATH_DEFINES

#include <math.h>

#include <iostream>

#include <conio.h>

using namespace std;

void main (void)

{

out << endl << "vvedite a, x1, x2 ";

float x1, a, x2;

cin>>a>>x1>>x2;

float vir1;

vir1 = countX (x1*x1, x2, M_PI_2); // countX !

float vir2;

vir2 = countX (x2, x1 + 1.2, 0); // countX !

float x = 1./11 + a * vir1 + 1 / vir2;

cout << endl << "X = " << x;

getch();

}

float countX (float a, float b, float c)

{

float x;

x= (a * cos(b + c) - b * sin(a + c)) / (pow(a,3) + b * b);

return x;

}

countX

 

 

:

List Error

Error 2 error C3861: 'countX': identifier not found \2\example2.cpp 15

Error 3 error C3861: 'countX': identifier not found \2\example2.cpp 16

 

, , countX?

, , .

 

( ) , ( !):

float countX (float a, float b, float c);

 

 

( -) main, , .

// example2.cpp

// , main

Define _USE_MATH_DEFINES

#include <math.h>

#include <iostream>

#include <conio.h>

using namespace std;

float countX (float a, float b, float c);

void main (void)

{

out << endl << "vvedite a, x1, x2 ";

float x1, a, x2;

cin>>a>>x1>>x2;

float vir1;

vir1 = countX (x1*x1, x2, M_PI_2); // countX !

float vir2;

vir2 = countX(x2, x1 + 1.2, 0); // countX !

float x = 1./11 + a * vir1 + 1 / vir2;

cout << endl << "X = " << x;

getch();

}





:


: 2016-10-06; !; : 378 |


:

:

.
==> ...

1674 - | 1620 -


© 2015-2024 lektsii.org - -

: 0.013 .