I've written this as a revision and although the program works but at the end of the program, a error windows pop up. I was wondering what is wrong but i couldn't find out. Anyone kind enough to point it out?
Thanks in advanced
#include <iostream.h>
int Difference(int []);
int main(){
int intarr[9],x=10;
for (int count=0;count<10;count++){
cout<<"Please enter a number to be entered into the array ("<<x<<" more to be entered) : ";
cin>>intarr[count];
x--;
}
cout<<"The difference between the sum of all values from cell 0 to 4 and the sum from cell 5 to 9 is "<<Difference(intarr)<<endl;
return 0;
}
int Difference(int intarr[9]){
int diff=0,set1=0,set2=0;