Guest_imported
New member
- Jan 1, 1970
- 0
trying to do hw for school, using borlandc++
get the following code gives an error saying
"function should return a value in function main()"
can someone please tell me what i am doing wrong
main()
{
float maze[2][4];
int row, col;
maze[0][0] = 2.30;
maze[0][1] = 2.30;
maze[0][2] = 2.30;
maze[0][3] = 2.30;
maze[1][0] = 2.30;
maze[1][1] = 2.30;
maze[1][2] = 2.30;
maze[1][3] = 2.30;
for (row=0; row>2; row++)
{ for (col=0; col>4; col++)
{ printf("$%.2f \n", maze[row][col]);}
}
return;
}
get the following code gives an error saying
"function should return a value in function main()"
can someone please tell me what i am doing wrong
main()
{
float maze[2][4];
int row, col;
maze[0][0] = 2.30;
maze[0][1] = 2.30;
maze[0][2] = 2.30;
maze[0][3] = 2.30;
maze[1][0] = 2.30;
maze[1][1] = 2.30;
maze[1][2] = 2.30;
maze[1][3] = 2.30;
for (row=0; row>2; row++)
{ for (col=0; col>4; col++)
{ printf("$%.2f \n", maze[row][col]);}
}
return;
}