author | alpar |
Fri, 19 Mar 2004 07:58:58 +0000 | |
changeset 204 | d8107ae24128 |
child 207 | 9910d5a5be7f |
permissions | -rw-r--r-- |
athos@201 | 1 |
#include <xy.h> |
athos@201 | 2 |
#include <iostream> |
athos@201 | 3 |
using namespace std; |
athos@201 | 4 |
int main() |
athos@201 | 5 |
{ |
athos@201 | 6 |
cout << "Kerek sok sikvektorokat." << endl; |
athos@201 | 7 |
|
athos@201 | 8 |
xy<int> osszeg; |
athos@201 | 9 |
xy<int> z; |
athos@201 | 10 |
|
athos@201 | 11 |
vector< xy<int> > v; |
athos@201 | 12 |
|
athos@201 | 13 |
while(cin >> z) { |
athos@201 | 14 |
v.push_back(z); |
athos@201 | 15 |
osszeg += z; |
athos@201 | 16 |
cout << "Az összeg aktualisan: " << osszeg << endl; |
athos@201 | 17 |
} |
athos@201 | 18 |
|
athos@201 | 19 |
|
athos@201 | 20 |
|
athos@201 | 21 |
cout << "A kovetkezo szamokat szoroztam ossze:" << endl; |
athos@201 | 22 |
for(unsigned int i=0; i<v.size(); ++i) { |
athos@201 | 23 |
cout << v[i] << ", A normanégyzete: " << v[i].normSquare() <<endl; |
athos@201 | 24 |
} |
athos@201 | 25 |
cout << "Eleg nehez volt." << endl; |
athos@201 | 26 |
} |