Hello, I'm really new at this, I'm trying to create a program that asks the user for 5 weights in a class, eg(10%-midterm, 30%-final etc..), asks for the 5 grades on those weights, and then turns it into one grade. Here's what I have so far, I know it's a mess, I'm a nube.
#include <iostream>
using namespace std;
void getFloatArrayFromUser(float theArray[], float size)
{
int index = 0;
do
{
cin >> theArray[index];
index++;
}
while (index < size);
return;
}
void displayFloatArrayToConsole(float theArray[], float size)
{
int index = 0;
do
{
cout << theArray[index] << " ";
index++;
}
while (index < size);
return;
}
void bankTotal(float bankTotal [0.08][0.1[0.1][0.32][0.40], int index[], int size[]);
{
int index = 0;
do
{
totalArray[index] = bankTotal[index];
index++;
}
while (index < size);
}
int main()
{
int Tutorials[5];
int MT1[5];
int MT2[5];
int Assign[5];
int FinalExam[5];
int totalArray[5];
float bankTotal[5]={0.08,0.1,0.1,0.32,0.40};
cout << "Enter the student's 5 marks: ";
getFloatArrayFromUser(totalArray, 5);
displayFloatArrayToConsole(totalArray, 5);
cout << "The average is: ";
bankTotal(5);