diff options
Add files via upload
1 files changed, 29 insertions, 0 deletions
| -rw-r--r-- | Sem. 05/Interval/Interval.h | 29 |
diff --git a/Sem. 05/Interval/Interval.h b/Sem. 05/Interval/Interval.h new file mode 100644 index 0000000..432b368 --- /dev/null +++ b/Sem. 05/Interval/Interval.h @@ -0,0 +1,29 @@ +
+class Interval
+{
+ int a;
+ int b;
+
+ size_t countNumbersInIntervalCondition(bool(*pred)(int)) const;
+
+public:
+
+ Interval();
+ Interval(int a, int b);
+
+ int getA() const;
+ int getB() const;
+
+ void setA(int a);
+ void setB(int b);
+
+ size_t getLength() const;
+ bool isMemberOfInterval(int x) const;
+
+ size_t calcPrimeNumbersInTheInterval() const;
+ size_t calcPalindromicNumbersInTheInterval() const;
+ size_t calcDiffrentDigitNumbersInTheInverval() const;
+ bool areStartAndEndPowersOfTwo() const;
+ Interval intersect(const Interval& other) const;
+ bool isSuperInterval(const Interval& other) const;
+};
\ No newline at end of file |
