1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#include <cstdlib>
#include <iostream>
using namespace std;
void getScore(int,int,int,int,int);
void findLowest(int,int,int,int,int);
void calcAverage();
int main()
{
int score1,score2,score3,score4,score5;
int calcAverage(int);
// getSCore function to get user input
int getScore(int num1,int num2,int num3,int num4,int num5);
{int num1,num2,num3,num4,num5;
cout<<"Enter a test score"<<endl;
cin>>num1>>num2>>num3>>num4>>num5;
return num1,num2,num3,num4,num5;
}
void calcAverage(int average)
{
int low;
low=findLowest(lowest);
low/4=average;
return average;}
//findLowest function
findLowest(num1,num2,num3,num4,num5)
{ int num1,num2,num3,num4,num5;
int lowest = num1;
if (num2<lowest)
{lowest=num2;
}
if(num3<lowest)
{lowest=num3;
}
if (num4<lowest)
{lowest=num4;
}
if (num5<lowest)
{lowest=num5;
}
return lowest;
}
// just things i was toying with when i first started.
// may use. mite not need. for (int count=0;count<=5;count++) // call getScore 5 times with for loop
// getScore(score1,score2,score3,score4,score5);
system("PAUSE");
return 0;
}
|