code: удалили весь специфичный для варианта код

main
ShinkarenkoVA 1 год назад
Родитель dc5584236a
Сommit 387c7255d3

@ -7,7 +7,7 @@ using namespace std;
int main()
{
const size_t MAX_ELEMENT = 76;
double number_count;
size_t number_count;
cerr << "Enter number count: ";
cin >> number_count;
@ -18,7 +18,7 @@ int main()
cin >> numbers[i];
}
double bin_count;
size_t bin_count;
cerr << "Enter bin count: ";
cin >> bin_count;
@ -68,29 +68,19 @@ int main()
height[j] = MAX_ELEMENT * (bins[j]/max_count);
}
char draw_sym;
cerr << "Please, select a symbol to draw: ";
cin >> draw_sym;
char axis_sym;
cerr << "Please, select a symbol for an axis: ";
cin >> axis_sym;
char space_sym;
cerr << "Please, select a symbol to indicate space: ";
cin >> space_sym;
if (max_count > MAX_ELEMENT){
for (size_t j=0; j < bin_count; j++)
{
if (bins[j] < 100) {
cout << space_sym;
cout << " ";
if (bins[j] < 10){
cout << space_sym;
cout << " ";
}
}
cout << bins[j] << axis_sym;
cout << bins[j] << "|";
for (size_t i=0; i < height[j]; i++){
cout << draw_sym;
cout << "*";
}
cout << endl;
}
@ -99,15 +89,15 @@ int main()
for (size_t j=0; j < bin_count; j++)
{
if (bins[j] < 100) {
cout << space_sym;
cout << " ";
if (bins[j] < 10){
cout << space_sym;
cout << " ";
}
}
cout << bins[j] << axis_sym;
cout << bins[j] << "|";
for (size_t i=0; i < bins[j];i++){
cout << draw_sym;
cout << "*";
}
cout << endl;
}

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