|
@@ -0,0 +1,42 @@
|
|
|
+#include <iostream>
|
|
|
+const char texttable[1000] = R"(
|
|
|
+▗▖ ▗▖ ▗▄▖ ▗▖ ▗▖▗▖ ▗▖▗▖ ▗▖▗▖ ▗▄▄▄▖▗▄▄▄▖▗▄▖ ▗▄▄▖
|
|
|
+▐▌▗▞▘▐▌ ▐▌▐▛▚▖▐▌▐▌▗▞▘ ▝▚▞▘ ▐▌ ▐▌ █ ▐▌ ▐▌▐▌ ▐▌
|
|
|
+▐▛▚▖ ▐▛▀▜▌▐▌ ▝▜▌▐▛▚▖ ▐▌ ▐▌ ▐▛▀▀▘ █ ▐▌ ▐▌▐▛▀▚▖
|
|
|
+▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌ ▐▌ ▐▙▄▄▖▐▙▄▄▖ █ ▝▚▄▞▘▐▌ ▐▌
|
|
|
+
|
|
|
+ )";
|
|
|
+
|
|
|
+
|
|
|
+int main()
|
|
|
+{
|
|
|
+ double a,b;
|
|
|
+ int x;
|
|
|
+ double* aprt = &a;
|
|
|
+ double* bprt = &b;
|
|
|
+ int* xprt = new int;
|
|
|
+ std::cout << texttable << "\n" << "Введите число A и B\n";
|
|
|
+ std::cin >> *aprt >> *bprt;
|
|
|
+ std::cout << "Выберите: 1:+2:-3:/4:*\n";
|
|
|
+ std::cin >> *xprt;
|
|
|
+ switch (*xprt) {
|
|
|
+ case 1:
|
|
|
+ std::cout << "Итог: " << *aprt + *bprt;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ std::cout << "Итог: " << *aprt - *bprt;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ if (*aprt || *bprt == 0) { std::cout << "На ноль делить нельзя";}
|
|
|
+ else {
|
|
|
+ std::cout << "Итог: " << *aprt / *bprt;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ std::cout << "Итог: " << *aprt * *bprt;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ std::cout << "Ничего не выбрано";
|
|
|
+ }
|
|
|
+
|
|
|
+}
|