Commit 5c286dbe authored by Aro Ghukasyan's avatar Aro Ghukasyan

Aro Ghukasyan Exe_07_10 V.7

parent be47f63c
If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale:
1. $200 - 299 12
If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale:
1. $200 - 299 10
2. $300 - 399 0
3. $400 - 499 1
4. $500 - 599 1
......
If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale: If you want break Enter -1 Enter Week Sale:
1. $200 - 299 10
2. $300 - 399 0
3. $400 - 499 1
4. $500 - 599 1
5. $600 - 699 1
6. $700 - 799 2
7. $800 - 899 1
8. $900 - 999 1
9. $1000 and more 3
......@@ -12,7 +12,7 @@ main()
std::cout << std::endl;
for (int i = 0; i < ARRAY_SIZE - 1; ++i) {
int rangeOfnumber = 100 * (i + 2);
const int rangeOfnumber = 100 * (i + 2);
std::cout << i + 1 << ". $" << rangeOfnumber << " - " << rangeOfnumber + 99 << "\t";
std::cout << "\t" << arrayCount[i];
......@@ -29,17 +29,21 @@ main()
void
getSalaries(int * array, int ARRAY_SIZE)
{
int sale;
int allSalary;
do
{
std::cout << "If you want break Enter -1 \t Enter Week Sale: ";
int sale;
std::cin >> sale;
if (0 > sale && -1 != sale) {
std::cerr << "\nError 1: Sale can not be negative.";
if (-1 == sale) {
break;
}
if (-1 > sale) {
std::cerr << "\nError 1: Sale can not be negative." << std::endl;
break;
}
int allSalary;
allSalary = (sale * 9 / 100) + 200;
if (1000 < allSalary) {
......@@ -47,5 +51,5 @@ getSalaries(int * array, int ARRAY_SIZE)
} else {
++array[allSalary / 100 - 2];
}
} while (-1 != sale);
} while (true);
}
\ No newline at end of file
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