2 İşlemeler 25928eb924 ... c9bc2a714c

Yazar SHA1 Mesaj Tarih
  Adolser c9bc2a714c Merge branch 'master' of https://notabug.org/SickShadow/look 1 ay önce
  Adolser f187da8b14 TaSk7 1 ay önce

BIN
cpp/task7/task1


+ 19 - 0
cpp/task7/task1.cpp

@@ -0,0 +1,19 @@
+#include <iostream>
+
+
+
+
+int main()
+{
+	int a,b;
+	std::cin >> a;
+	std::cin >> b;
+    int* aptr = &a;
+	int* bptr = &b;
+	if (*aptr > *bptr) {
+		std::cout << "A больше" << "\n";
+	} else {
+		std::cout << "B больше" << "\n";
+	}
+
+}

BIN
cpp/task7/task2


+ 20 - 0
cpp/task7/task2.cpp

@@ -0,0 +1,20 @@
+#include <iostream>
+#include <ostream>
+
+
+
+
+
+int main()
+{
+	int a,b;
+	std::cin >> a;
+	int* aprt = &a;
+	if (*aprt > 0) {
+		std::cout << "A положительное" << std::endl;
+	} else if ( *aprt < 0 ) {
+		std::cout << "A отрицательное" << std::endl;
+	} else {
+		std::cout << "A равняется 0" << std::endl;
+	}
+}

BIN
cpp/task7/task3


+ 13 - 0
cpp/task7/task3.cpp

@@ -0,0 +1,13 @@
+#include <iostream>
+
+
+
+int main()
+{
+	int a,b;
+	std::cout <<  "Введите A и B\n";
+	std::cin >> a >> b;
+	int* aptr = &b;
+	int* bptr = &a;
+	std::cout << "Меняем : " << "A: " << *aptr << " B: " << *bptr; 
+}

BIN
cpp/task7/task4


+ 42 - 0
cpp/task7/task4.cpp

@@ -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 << "Ничего не выбрано";
+	}
+
+}

BIN
cpp/task7/task5


+ 0 - 0
cpp/task7/task5.cpp


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor