Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Proizvod.h"
- #include <iostream>
- using namespace std;
- void main()
- {
- Proizvod* niz = new Proizvod[3];
- for (int i = 0; i < 3; i++) {
- cin >> niz[i];
- }
- for (int i = 0; i < 3; i++) {
- niz[i]--;
- }
- for (int i = 0; i < 3; i++) {
- cout << niz[i];
- }
- int max = 0;
- for (int i = 1; i < 3; i++) {
- if (niz[max] < niz[i])
- max = i;
- }
- cout << "proizvod sa najvecom ukupnom vrednoscu je: " << endl;
- cout << niz[max];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement