Floating point exception (core dumped)

#include<iostream>
#include<iomanip>
using namespace std;
void inputData(int data [][5],int rowSize,int colSize);
float dialogSum(int data [][5],int row,int col);

int main()
{
int rowsize,colsize;
int data[5][5]={{3,2,-1,9,0},{0,1,5,6,7},{2,4,6,8,7},{-9,2,3,7,10},{-1,12,-3,-4,-5}};
inputData(data,rowsize,colsize);

dialogSum(data,rowsize,colsize);
return 0;
}

void inputData(int data [][5],int rowSize,int colSize)
{
for(int rowSize=0;rowSize<5;rowSize++)
{
for(int colSize=0;colSize<5;colSize++)
{
cout<<setw(4)<<data[rowSize][colSize];
}
cout<<endl;
}

}

float dialogSum(int data [][5],int row,int col)
{
int sum=0;
for(int row=0;row<5;row++)
{

for(int col=0;col<5;col++)
{
if (row == 0 && col == 0) {
sum+=data[row][col];
cout<<sum;
}
else if ((row)/(col) == 1) //1 is slope of array
{
sum+=data[row][col];
cout<<sum;

// sum=sum+data[rowSize+1][colSize+1];
// }
// cout<<sum<<endl;

}
}
}
return sum;
}
Unformatted code, no question, ...
You might want to avoid dividing by 0.
thanks guys for help
Topic archived. No new replies allowed.