Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Header.h"
- using namespace std;
- //const int KOL = 3;
- class Vektors
- {
- private:
- int Vector_X[3];
- int Vector_Y[3];
- vector<int> Vector_Z;
- public:
- // int sozd();
- // int set();
- //void show();
- int set()
- {
- int n;
- cout << "vvedite vec1: ";
- // n = sizeof(Vector_X)/sizeof(int);
- for (int i = 0; i < 3; i++){
- cin >> Vector_X[i];
- }
- // m = sizeof(Vector_Y)/sizeof(int);
- cout << "vvedite vec2: ";
- for (int i = 0; i < 3; i++){
- cin >> Vector_Y[i];
- }
- cout << "---------------------------------------------------" << endl;
- cout << endl;
- int el;
- for (int i = 0; i < 3; i++){
- for (int j = 0; j < 3; j++){
- if(i == j) {
- el = Vector_X[i] * Vector_Y[j];
- Vector_Z.push_back(el);
- }
- }
- }
- cout <<"vector Z: "<<endl;
- for (int i = 0; i < 3; i++){
- cout<< Vector_Z[i] << " ";
- }
- cout << endl;
- return 0;
- }
- void show()
- {
- cout << set() << endl << endl;
- }
- };
Add Comment
Please, Sign In to add comment