Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- main()
- {
- int x, y, z, m, n, s = 0, p = 0, br_plocica, a;
- cin >> x >> y >> z >> m >> n;
- a = x;
- do
- {
- s = s + 1;
- a = a - m;
- }
- while (a>0);
- a = y;
- do
- {
- p = p + 1;
- a = a - n;
- }
- while (a>0);
- br_plocica = p * s;
- p = 0; s = 0;
- a = x;
- do
- {
- s = s + 1;
- a = a - m;
- }
- while (a>0);
- a = z;
- do
- {
- p = p + 1;
- a = a - n;
- }
- while (a>0);
- br_plocica += 2 * p * s;
- p = 0; s = 0;
- a = y;
- do
- {
- s = s + 1;
- a = a - m;
- }
- while (a>0);
- a = z;
- do
- {
- p = p + 1;
- a = a - n;
- }
- while (a>0);
- br_plocica += 2 * p * s;
- cout << br_plocica << endl;
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement