diff --git a/Lab1.cbp b/Lab1.cbp
index 1af61f7..942997f 100644
--- a/Lab1.cbp
+++ b/Lab1.cbp
@@ -43,6 +43,9 @@
+
+
+
diff --git a/main.cpp b/main.cpp
index da7dbfc..7831470 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,6 +1,7 @@
using namespace std;
#include "histogram.h"
#include "text.h"
+#include "svg.h"
#include
diff --git a/svg.cpp b/svg.cpp
new file mode 100644
index 0000000..adff469
--- /dev/null
+++ b/svg.cpp
@@ -0,0 +1,18 @@
+#include "svg.h"
+void svg_begin(double width, double height) {
+ std::cout << "\n";
+ std::cout << "\n";
+}
+
+void show_histogram_svg(const std::vector& bins) {
+ svg_begin(400, 300);
+ svg_end();
+}
diff --git a/svg.h b/svg.h
new file mode 100644
index 0000000..8e75041
--- /dev/null
+++ b/svg.h
@@ -0,0 +1,10 @@
+#ifndef SVG_H_INCLUDED
+#define SVG_H_INCLUDED
+
+#include
+#include
+void svg_begin(double width, double height);
+void svg_end();
+void show_histogram_svg(const std::vector& bins);
+
+#endif // SVG_H_INCLUDED
diff --git a/text.cpp b/text.cpp
new file mode 100644
index 0000000..616d234
--- /dev/null
+++ b/text.cpp
@@ -0,0 +1,41 @@
+#include "text.h"
+
+void show_histogram_text(std::vector bins , size_t bin_count) {
+ size_t maxCount = maxBin(bins);
+ size_t count_stars;
+ for (size_t i = 0; i < bin_count; i++) {
+
+ if (bins[i] < 100) {
+ std::cout << " ";
+ }
+ if (bins[i] < 10) {
+ std::cout << " ";
+ }
+
+ std::cout << bins[i];
+ std::cout << "|";
+
+ if (maxCount > MAX_ASTERISK) {
+ count_stars = MAX_ASTERISK * (static_cast(bins[i]) / maxCount);
+ }
+ else {
+ count_stars = bins[i];
+ }
+ for (size_t i2 = 0; i2 < count_stars; i2++) {
+ std::cout << "*";
+ }
+ std::cout << std::endl;
+
+
+ }
+}
+
+const size_t maxBin(std::vector bins) {
+ size_t max = bins[0];
+ for (int i = 1; i < bins.size(); i++) {
+ if (max < bins[i]) {
+ max = bins[i];
+ }
+ }
+ return max;
+}
diff --git a/text.h b/text.h
new file mode 100644
index 0000000..d3dd6b5
--- /dev/null
+++ b/text.h
@@ -0,0 +1,12 @@
+#ifndef TEXT_H_INCLUDED
+#define TEXT_H_INCLUDED
+
+
+#include
+#include
+
+const size_t SCREEN_WIDTH = 80;
+const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
+void show_histogram_text(std::vector bins , size_t bin_count);
+const size_t maxBin(std::vector bins);
+#endif // TEXT_H_INCLUDED