equal
deleted
inserted
replaced
|
1 #include <xy.h> |
|
2 #include <iostream> |
|
3 using namespace std; |
|
4 int main() |
|
5 { |
|
6 cout << "Kerek sok sikvektorokat." << endl; |
|
7 |
|
8 xy<int> osszeg; |
|
9 xy<int> z; |
|
10 |
|
11 vector< xy<int> > v; |
|
12 |
|
13 while(cin >> z) { |
|
14 v.push_back(z); |
|
15 osszeg += z; |
|
16 cout << "Az összeg aktualisan: " << osszeg << endl; |
|
17 } |
|
18 |
|
19 |
|
20 |
|
21 cout << "A kovetkezo szamokat szoroztam ossze:" << endl; |
|
22 for(unsigned int i=0; i<v.size(); ++i) { |
|
23 cout << v[i] << ", A normanégyzete: " << v[i].normSquare() <<endl; |
|
24 } |
|
25 cout << "Eleg nehez volt." << endl; |
|
26 } |