# Averaging Program

Email
 Submitted on: 1/7/2015 6:48:00 PM By: john Fivekiller (from psc cd) Level: Beginner User Rating: By 2 Users Compatibility: C, C++ (general) Views: 788

To make the task of averaging out numbers easy by using my programing skills

code:
Can't Copy and Paste this?
 ``` //************************************** // Name: Averaging Program // Description:To make the task of averaging out numbers easy by using my programing skills // By: john Fivekiller (from psc cd) // // Assumes:It accepts only floating point numbers // // Side Effects:Has not been debugged side effects unknown //************************************** #include #include float average(int number, float total) { float average; average = total / number; return average; } int getnumber(void) { int number; cout<<"Enter the total numbers\n"; cin>>number; return number; } float getallnumbers (int amount) { float input; int i = 0; cout<<"Enter All number to be divided\n"; float allnumbers = 0.0; while (i < amount) { cin>>input; allnumbers = allnumbers + input; amount--; } return allnumbers; } using namespace std; int main(int argc, char *argv[]) { int number; number=getnumber(); float total; total=getallnumbers(number); float theaverage; theaverage=average(number,total); cout<<"The average of the numbers are "<

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)