.


:




:

































 

 

 

 





Y 15 , G - 20. , 0 31. d .. 20%. , g, . . Ⳮ, .

.1 ˳

#include <iostream>

#include <conio.h>

#include <fstream>

 

using namespace std;

 

int main() {

 

double y[15], g[20], d(0);

 

cout << "Enter salaryVvedit zarplaty: ";

cin >> d;

 

ofstream fout("n12.txt");

fout << "Y:\n";

cout << "Y:\n";

 

for (int i(0); i < 15; i++)

{

y[i] = (0 + rand() % 31) * d;

y[i] -= y[i] * 0.2;

 

cout << y[i] << " ";

fout << y[i] << " ";

}

 

cout << "\n\nG:\n";

fout << "\n\nG:\n";

 

for (int i(0); i < 20; i++)

{

g[i] = (0 + rand() % 31) * d;

g[i] -= y[i] * 0.2;

cout << g[i] << " ";

fout << g[i] << " ";

}

 

_getch();

return 0;

}

 

.2


, k, n =1, 2, '6, 4. (). , .

.1 ˳

#include <iostream>

#include <conio.h>

#include <fstream>

 

using namespace std;

 

int main() {

 

double y[15], g[20], d(0);

 

cout << "Vvedit zarplaty: ";

cin >> d;

 

ofstream fout("12.txt");

fout << "Y:\n";

cout << "Y:\n";

 

for (int i(0); i < 15; i++)

{

y[i] = (0 + rand() % 31) * d;

y[i] -= y[i] * 0.2;

 

cout << y[i] << " ";

fout << y[i] << " ";

}

 

cout << "\n\nG:\n";

fout << "\n\nG:\n";

 

for (int i(0); i < 20; i++)

{

g[i] = (0 + rand() % 31) * d;

g[i] -= y[i] * 0.2;

cout << g[i] << " ";

fout << g[i] << " ";

}

 

_getch();

return 0;

}


.2

 


 

(k) 1 6, ' () - 1 5. ʳ , , akn = random(10i + 50), - , , , . , , - . . .

 





:


: 2016-11-18; !; : 628 |


:

:

80% - .
==> ...

1774 - | 1625 -


© 2015-2024 lektsii.org - -

: 0.008 .