Commit 86ff048f authored by Aro Ghukasyan's avatar Aro Ghukasyan

delet

parent f43f3e72
#include <iostream>
void allocationRange(int * aray, const int ARRAY_SIZE);
void allocationRange(int * array, const int ARRAY_SIZE);
int
main()
......@@ -10,9 +10,8 @@ main()
allocationRange(arrayCount, ARRAY_SIZE);
std::cout << std::endl;
int rangeOfumber;
for (int i = 0; i < ARRAY_SIZE - 1; ++i) {
rangeOfumber = 100 * (i + 2);
int rangeOfumber = 100 * (i + 2);
std::cout << i + 1 << ". $" << rangeOfumber << " - " << rangeOfumber + 99 << "\t";
std::cout << "\t" << arrayCount[i];
......@@ -26,7 +25,7 @@ main()
}
void
allocationRange(int * aray, const int ARRAY_SIZE)
allocationRange(int * array, const int ARRAY_SIZE)
{
int sale;
......@@ -38,15 +37,13 @@ allocationRange(int * aray, const int ARRAY_SIZE)
if (0 > sale && -1 != sale) {
std::cerr << "\nError 1: Sale can not be negative.";
break;
} else {
allSalary = (sale * 9 / 100) + 200;
}
allSalary = (sale * 9 / 100) + 200;
if (1000 < allSalary) {
++aray[ARRAY_SIZE - 1];
++array[ARRAY_SIZE - 1];
} else {
++aray[allSalary / 100 - 2];
++array[allSalary / 100 - 2];
}
} while (-1 != sale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment