Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.82 KB | None | 0 0
  1. #include <iostream>
  2. #include "header.h"
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     while (true){
  9.         cout << "Enter the tusk number: ";
  10.         int num;
  11.         cin >> num;
  12.  
  13.         if (num == 1){
  14.             int x, y, k;
  15.             cin >> x >> k;
  16.             y = x;
  17.             increase(x, k);
  18.             cout << "link " << x << endl;
  19.             increase(&y, &k);
  20.             cout << "pointer " << y << endl;
  21.         }
  22.         else if (num == 2){
  23.             float one, two;
  24.             cin >> one;
  25.             two = one;
  26.             modf(&one);
  27.             modf(two);
  28.             cout << "pointer " << one << endl << "link "  << two << endl;
  29.         }
  30.         else if (num == 3){
  31.             float real, imag;
  32.             cout << "Enter real part and imaginary part: ";
  33.             cin >> real >> imag;
  34.             Complex x(real, imag), y(real, imag);
  35.             x.view();
  36.             conjugate(&x);
  37.             conjugate(y);
  38.             cout << "pointer: ";
  39.             x.view();
  40.             cout << "link: ";
  41.             y.view();
  42.         }
  43.         else if (num == 4){
  44.             cout << "Enter the coordinates of the corners clockwise: ";
  45.             float x, y;
  46.             cin >> x >> y;
  47.             Vector a(x, y);
  48.             cin >> x >> y;
  49.             Vector b(x, y);
  50.             cin >> x >> y;
  51.             Vector c(x, y);
  52.             cin >> x >> y;
  53.             Vector d(x, y);
  54.             cout << "Enter the coordinates of the vector: ";
  55.             cin >> x >> y;
  56.             Vector v(x, y);
  57.             Square first_sq(a, b, c ,d), second_sq(a, b, c, d);
  58.             moving(&first_sq, &v);
  59.             moving(second_sq, v);
  60.             cout << "pointer: ";
  61.             first_sq.view();
  62.             cout << "link: ";
  63.             second_sq.view();
  64.         }
  65.     }
  66.     return 0;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement