#include "pch.h" #include "MathLibrary.h" double MathLibrary::Divide(double a, double b) { if (b != 0) return a / b; return 0.0; } bool MathLibrary::IsPositive(int n) { return n >= 0; } bool MathLibrary::CheckRange(int a, int b) { return (a > 0) && (b < 10); } double MathLibrary::CalculateDiscount(int age, bool isMember) { if (age < 18) return isMember ? 0.25 : 0.20; else return isMember ? 0.15 : 0.10; }