.


:




:

































 

 

 

 


2_1_1.




 

1

#include <iostream>

using std::endl;

using std::cout;

using std::cin;

//

int max2(int a, int b) //

{ //

if (a > b)

return a;// return

else

return b;

}

int main() // main

{ // max a, b, c

int a, b, c, d;

cout << " , b, :";

cin >> a >> b >> c;

d = max 2(a, b); // max a, b

// d = max a, b

d = max 2(d, c); // max d, c

// d = max d, c a, b, c

cout << " - " << d << endl;

system("pause");

return 0;

}

2

#include <iostream>

using std::endl;

using std::cout;

using std:: cin;

int max 2(int, int); // :

Int main()

{ // max a,b,c

int a, b, c, d; // ma in

cout << " , b, :";

cin >> a >> b >> c;

d = max 2(max 2(a, b), c); // max

// max 1 2_1

cout << " - " << d<<endl;

system("pause");

return 0;

}

//

int max2(int a, int b) //

{ //

int d; // , max

a>b? d=a: d=b;

Return d;

}

 

 

( 2.2) .

2.2

(, , ), ( main).

. , , .

 

. , . : ( ), ( ).

. 2.3. , .

2.3

.

2.3 f x 0, a ++ f.

( ) , , .

 

 

 

, ( ), .

 





:


: 2018-10-14; !; : 358 |


:

:

, .
==> ...

1510 - | 1342 -


© 2015-2024 lektsii.org - -

: 0.009 .