Hey guys, this is supposed to be a simple program where a teacher can enter the marks of students, find the average, s.d and etc. I have a problem inside s.d part that i dont understand.
#include <iostream>
usingnamespace std;
//function prototypes
void readMarks(int[],int&);
void showMarks(int[],int);
void deleteMarks(int[],int&);
double Average(int[],int);
double SD(int[],int);
void countOccurences(int[],int);
void pause();
void clear();
// main function
int main()
{
int marks[20]; //to hold marks
int size=0; //for number of marks
int choise;
do
{
cout<<"\n0.Exit\n1.Add a student Marks\n2.List all student marks\n3.Average\n4.SD\n5.Delete\n6.Find Occurences"<<endl;
cout<<"\nEnter your choice-> ";
cin>>choise;
switch(choise)
{
case 1:readMarks(marks,size);break;
case 2:showMarks(marks,size);break;
case 3:cout<<endl<<Average(marks,size)<<endl;break;
case 4:cout<<endl<<SD(marks,size)<<endl;break;
case 5:deleteMarks(marks,size);break;
case 6:countOccurences(marks,size);break;
case 0:exit(0);
}