Please I need help

Am creating a menu - driven application that aceepts amount outstanding for ten customers and display the following information:
1. The max. amount outstanding;
2. The min. amount outstanding;
3. The average amount outstanding;
4. The number of customers whose amount outstanding is > 0
5. the amount outstanding in ascending and descending order.

Pls, I came up with the following codes


#include<iostream>
//#include<stdlib>
using namespace std;

float amountOS[10];

void acceptArrayList();
void displayArray();
void displayArray(float creditLimit);
float maxAmount();
float minAmount();
float avgAmount();
void sortArray(char sortType);

int main()

{
int choice=0;
float limit=0;
//char system();
acceptArrayList();

do
{
system("clear");

cout << "Main Menu" << endl;
cout << "***********";
cout << "\n\n\n\n\n\n";


cout << "1. Maximun Amount OS" << endl;
cout << "2. Mininum Amount OS" << endl;
cout << "3. Average Of Amounts OS" << endl;
cout << "4. Amount Greater Than Limit" << endl;
cout << "5. Sort OS Amount - Ascending" << endl;
cout << "6. Sort OS Amount - Descending" << endl;
cout << "7. End Program !!" << endl;


cout << "\n\n\n\n\n\n\n" ;
cout << "Enter your Choice: ";
cin >> choice;


switch(choice)
{
case 1:
system("clear");
displayArray();
cout << "\n\n\n\n";
cout << "The Maximun Amount OS is: " << maxAmount() << endl;
break;

case 2:
system("clear");
displayArray();
cout << "\n\n\n\n";
cout << "The Minimun Amount OS is: " << minAmount() << endl;
break;

case 3:
system("clear");
displayArray();
cout << "\n\n\n\n: ";
cout << "The Average Amount OS is: " << avgAmount() << endl;
break;

case 4:
system("clear");
displayArray();
cout << "\n\n\n\n: ";
cout << "Enter The Limit Amount:";
cin>>limit;
displayArray(limit);
break;

case 5:
system("clear");
displayArray();
cout << "\n\n\n\n: ";
sortArray('a');
displayArray();
break;

case 6:

system("clear");
displayArray();
cout << "\n\n\n\n: ";
sortArray('c');
displayArray();
break;

case 7:
break;

default:
cout << 'invalid Choice Entered............. ' << endl;
break;
}

system('sleep 8');

} while(choice != 7);
}
void acceptArrayList()
{
for(int i=0; i<10; i++)
cout << "Enter Value For Array Index: " << !+1 << ': ';
cin >> amountOS[] << ' ';

}
}
void displayArray()
{
for(int i=0; i<10; i++)
cout << "amountOS[]<<" ': ';
cout << "\n\n\n\n: ";
}

void displayArray(float creditLimit)
{
cout << "The Amounts OS greater than:" << creditLimit << "are: " << endl;
cout << "\n\n\n" <<endl;
for(int i=0; i<10; i++)
{
if(amountOS[i]> creditLimit)
{
cout << amountOS[i]<< '';
}
}
cout << "\n\n\n";
}

float maxAmount()
{
float maxi = amountOS[0];
for(int i = 1; i <10; i++)
{
if(amountOS[i] > maxi)
{
maxi=amountOS[i];
}
}
return maxi
}
float minAmountOS[0];

for(int i = 1; i < 10; i++)
{
if(amountOS[i] < mini)
{
mini=amountOS[i];
}
}
return mini;

{

float avgAmount()
{
float avg - 0;
for(int i-0; i,10; i++)
{
avg = avg + amountOS[1];
}
avg/=i; //same as avg=avg/i
return avg;
}
void sortArray(char sortType)
{
float temp;

for(int outer=0; outer<10; outer++)
{
for(int inner=outer; inner<10; inner++)
{
if ( ((amountOS[inner]< amountOS[outer])
&& sortType=='a'
|| ((amountOS[inner]> amountOS[outer]))
&& sortType =='c'
(
temp=amountOS[inner];
amountOS[inner]=amountOS[outer];
amountOS[outer]=temp;
}
}
}
}

I have debugged severally since yesterday, I feel there is something am not doing right. Can you please help me.
Below is the errors and warnings I get.

mingw32-g++.exe -std=c++11 -c C:\pauls\amountavg.cpp -o C:\pauls\amountavg.o
C:\pauls\amountavg.cpp:99:21: warning: character constant too long for its type [enabled by default]
C:\pauls\amountavg.cpp:103:12: warning: character constant too long for its type [enabled by default]
C:\pauls\amountavg.cpp:110:67: warning: multi-character character constant [-Wmultichar]
C:\pauls\amountavg.cpp:118:36: warning: multi-character character constant [-Wmultichar]
C:\pauls\amountavg.cpp:130:39: error: empty character constant
C:\pauls\amountavg.cpp: In function 'int main()':
C:\pauls\amountavg.cpp:25:19: error: 'system' was not declared in this scope
C:\pauls\amountavg.cpp: In function 'void acceptArrayList()':
C:\pauls\amountavg.cpp:111:33: error: expected primary-expression before ']' token
C:\pauls\amountavg.cpp: At global scope:
C:\pauls\amountavg.cpp:114:5: error: expected declaration before '}' token
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 4 warning(s) (0 minute(s), 0 second(s))

Lots of careless mistakes.
The compiler is telling you everything that is wrong.

Line 99: You need to use " not ' for quoted literals.
Line 103: ditto
Line 111: You need to specify a subscript. You can't imply the whole array. Mixing << and >> in the same statement.
Line 114: Your braces don;t match up. You're missing a {
Line 118: Your quotes are in the wrong place. You need to specify a subscript.
Line 130: You need a single space between the single quotes.
Line 146: Needs a ;
Line 148: minAmountOS should have (), not [] and not have a 0 or ;
Line 159: Wrong brace. Should be }
Line 152,154,157: mini is not defined.
Line 163: I assume you menat =, not -.
Line 164: need = and < in for statement.
Line 168: Can't use i here. i went out of scope when the for loop ended.
Line 179: Parentheses are not balanced in the if statement.

PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Topic archived. No new replies allowed.