Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "header.h"
- using namespace std;
- int main()
- {
- while (true){
- cout << "Enter the tusk number: ";
- int num;
- cin >> num;
- if (num == 1){
- int x, y, k;
- cin >> x >> k;
- y = x;
- increase(x, k);
- cout << "link " << x << endl;
- increase(&y, &k);
- cout << "pointer " << y << endl;
- }
- else if (num == 2){
- float one, two;
- cin >> one;
- two = one;
- modf(&one);
- modf(two);
- cout << "pointer " << one << endl << "link " << two << endl;
- }
- else if (num == 3){
- float real, imag;
- cout << "Enter real part and imaginary part: ";
- cin >> real >> imag;
- Complex x(real, imag), y(real, imag);
- x.view();
- conjugate(&x);
- conjugate(y);
- cout << "pointer: ";
- x.view();
- cout << "link: ";
- y.view();
- }
- else if (num == 4){
- cout << "Enter the coordinates of the corners clockwise: ";
- float x, y;
- cin >> x >> y;
- Vector a(x, y);
- cin >> x >> y;
- Vector b(x, y);
- cin >> x >> y;
- Vector c(x, y);
- cin >> x >> y;
- Vector d(x, y);
- cout << "Enter the coordinates of the vector: ";
- cin >> x >> y;
- Vector v(x, y);
- Square first_sq(a, b, c ,d), second_sq(a, b, c, d);
- moving(&first_sq, &v);
- moving(second_sq, v);
- cout << "pointer: ";
- first_sq.view();
- cout << "link: ";
- second_sq.view();
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement