Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com C++ Help

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 10-07-2012, 02:49 AM PM User | #1 alexb9054 New to the CF scene   Join Date: Oct 2012 Posts: 1 Thanks: 0 Thanked 0 Times in 0 Posts C++ Help Assignment Questions: 4. Calculate each student letter grade using a function, save the letter grade to another array defined in main function. 5. Return the count of the grades for each letter grade (A, B, C,D, F) using a function 6. Perform a selection sort on the number grade array into descending order and output them again using functions. I need some help on the last 3 questions of my assignment and I cannot figure out how to do it. Here's my code so far. I just don't know how to save them in an array etc. Other than that the program ran fine before I started adding the last few steps Code: ```#include #include #include #include using namespace std; //Global Function void averageMaxCalc(int scoreInput[5], int sumZ, double& sAverage, double& sAverageF); void studentScoreCalc(int scoreInput[5], int sum);//Function studentScore() void deviation(int scoreInput[5], int sum); int letterGradesA(int scoreInput[5], char letterDefined); //|=======================| //|======== Main =========| //|=======================| int main (char LetterDefined) { cout << "Welcome to the student score calculator program.\n\n"; //Variables int scoreInput[5], sum = 0, sumZ = 0; double sAverage, sAverageF; //Defined char letterDefined; char letterGrades[6]; for (int m = 0; m < 6; ++m) { letterDefined = letterGrades[m]; } //Functions Within Main() studentScoreCalc(scoreInput, sum);//Function StudentScore() averageMaxCalc(scoreInput, sumZ, sAverage, sAverageF);//Function averageMaxCalc() deviation(scoreInput, sum);//Function deviation() //letterGradesA() returned letterGradesA(scoreInput, letterDefined); system("pause"); return 0; } //|=====================================| //|=== 1. Student Input and Max/Less ===| //|=====================================| void studentScoreCalc(int scoreInput[5], int sum) { //Declearing Variables sum = 0; cout << "Please Enter Student Scores below: \n";//Outputs to Console //Sum is set to 0 //Looping countScore and i 15x for (int i = 0; i <5; i++) { cin >> scoreInput[i];//Creates User Input } } //|=================================| //|=== 2. Funtion averageMaxCalc ===| //|=================================| void averageMaxCalc(int scoreInput[5], int sumZ, double& sAverage, double& sAverageF) { sumZ = 0;//Set sumZ to 0; //Gets Sum Of All Numbers sumZ = scoreInput[0]+scoreInput[1]+scoreInput[2]+scoreInput[3]+scoreInput[4]; //Finds The Average sAverage = sumZ / 5;//Finds Average sAverageF = (sumZ%5)*2;//Finds Decimal cout << "The Sum Of All Scores Is: " <

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 08:07 AM.