i've made this prog but it is not printing the correct output. plzzz help
#include
#include
void main()
{
clrscr();
int a[3][3],max,min;
cout<<"enter the matrix: ";
for(int i=0;i<3;i++)
{ for(int j=0;j<3;j++)
{ cin>>a[i][i]; }
}
max=a[0][0];
min=a[0][0];
for(i=0;i<3;i++)
{ for(int j=0;j<3;j++)
{ if(a[i][j]
min=a[i][j];
if(a[i][j]>max)
max=a[i][j];
}
}
cout<<"the max character is: "<
getch();
}
2007-01-05
19:22:14
·
2 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design