Сравнить коммиты

..

3 Коммитов

Автор SHA1 Сообщение Дата
Sasha (KobzevAV) 094298b728 project: 1.cbp
2 лет назад
Sasha (KobzevAV) e8ce0cef4c project: gitignore
2 лет назад
Sasha (KobzevAV) eac3e3ce69 code: main
2 лет назад

1
.gitignore поставляемый

@ -1,2 +1,3 @@
/obj /obj
/bin /bin
/curl

20
1.cbp

@ -31,8 +31,28 @@
<Compiler> <Compiler>
<Add option="-Wall" /> <Add option="-Wall" />
<Add option="-fexceptions" /> <Add option="-fexceptions" />
<Add directory="curl/include" />
</Compiler> </Compiler>
<Linker>
<Add library="libcurl.dll.a" />
<Add directory="curl/lib" />
</Linker>
<Unit filename="histogram.cpp" />
<Unit filename="histogram.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="histogram_internal.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="main.cpp" /> <Unit filename="main.cpp" />
<Unit filename="svg.cpp" />
<Unit filename="svg.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="text.cpp" />
<Unit filename="text.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Extensions> <Extensions>
<lib_finder disable_auto="1" /> <lib_finder disable_auto="1" />
</Extensions> </Extensions>

@ -10,13 +10,17 @@ struct Input {
}; };
Input Input
input_data(istream& in){ input_data(istream& in, bool prompt){
size_t number_count; size_t number_count;
in >> number_count; in >> number_count;
Input inp; Input inp;
inp.numbers.resize(number_count); inp.numbers.resize(number_count);
if (prompt){
std::cerr << "enter bin_count";
}
for (size_t i = 0; i < number_count; i++){ for (size_t i = 0; i < number_count; i++){
in >> inp.numbers[i]; in >> inp.numbers[i];
} }
@ -27,7 +31,7 @@ input_data(istream& in){
} }
int main(){ int main(){
auto in = input_data(cin); auto in = input_data(cin, true);
auto bins = make_histogram(in.numbers, in.bin_count); auto bins = make_histogram(in.numbers, in.bin_count);
auto borders = make_borders(in.numbers, in.bin_count); auto borders = make_borders(in.numbers, in.bin_count);
show_histogram_svg(bins, borders, in.bin_count); show_histogram_svg(bins, borders, in.bin_count);

Загрузка…
Отмена
Сохранить