Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <Windows.h>
- #include <iostream>
- using namespace std;
- int n;
- class Range
- {
- private:
- double a, b;
- public:
- Range()
- {
- cin >> a;
- cin >> b;
- }
- double getLenght()
- {
- return b - a;
- }
- bool isIntersect(const Range& r)
- {}
- float getIntersection(const Range& r)
- {
- }
- float getUnion(const Range& r)
- {
- }
- };
- Range *arr;
- //Range arr[1]; //my shitty crutch
- void in()
- {
- }
- void out()
- {
- //for (int i = 0; i < n-1; i++)
- //{
- double c = arr[0].getLenght();
- cout << c;
- //}
- }
- void controller()
- {
- Range *arr = new Range[n];
- in();
- out();
- delete[] arr;
- }
- int main()
- {
- cin >> n;
- controller();
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement