LedovskojMM 2 лет назад
Родитель 68b2820303
Сommit 7470cdab43

@ -12,3 +12,18 @@
1682271932 c:\users\admin\onedrive\Ðàáî÷èé ñòîë\lab1\histogam.h
<vector>
1682272812 source:c:\users\admin\onedrive\Ðàáî÷èé ñòîë\lab1\histogam.cpp
<iostream>
<vector>
<cmath>
"histogam.h"
1682273357 source:c:\users\admin\onedrive\Ðàáî÷èé ñòîë\lab1\text.cpp
<iostream>
<vector>
<cmath>
"text.h"
1682273447 c:\users\admin\onedrive\Ðàáî÷èé ñòîë\lab1\text.h
<vector>

@ -2,6 +2,7 @@
#include <vector>
#include <cmath>
#include "histogam.h"
#include "text.h"
using namespace std;
@ -27,26 +28,6 @@ input_data() {
return in;
}
void show_histogram_text(vector <size_t> bins, size_t bin_count ) {
for (size_t i = 0; i < bin_count; i++) {
if (bins[i] < 100) {
cout << " ";
}
if (bins[i] < 10) {
cout << " ";
}
cout << bins[i] << "|";
for (size_t j = 0; j < bins[i]; j++) {
cout << "*";
}
cout << "\n";
}
}
int main()
{
Input in = input_data();

@ -0,0 +1,21 @@
#include <iostream>
#include <vector>
#include <cmath>
#include "text.h"
using namespace std;
void show_histogram_text(vector <size_t> bins, size_t bin_count ) {
for (size_t i = 0; i < bin_count; i++) {
if (bins[i] < 100) {
cout << " ";
}
if (bins[i] < 10) {
cout << " ";
}
cout << bins[i] << "|";
for (size_t j = 0; j < bins[i]; j++) {
cout << "*";
}
cout << "\n";
}
}

@ -0,0 +1,8 @@
#ifndef TEXT_H_INCLUDED
#define TEXT_H_INCLUDED
#include <vector>
void show_histogram_text(std::vector <size_t> bins, size_t bin_count );
#endif // TEXT_H_INCLUDED
Загрузка…
Отмена
Сохранить