can sum1 pls explain why there isn't any output???
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a[50][50],r,c,ans=0;
cout<<"Enter Size of Array:";
cin>>r;
r=c;
for (int i=0;i<r;i++)
{
for (int j=0;j<c;j++)
{
cin>>a[i][j];
}
}
getch();
clrscr();
for (i=0;i<r;i++)
{
for (int j=0;j<r;j++)
{
cout<<a[i][j];
}
cout<<endl;
}
cout<<endl<<endl;
for (i=0;i<r;i++)
{ans=ans+a[i][i];}
for (i=(r-1);i>=0;i--)
{ans=ans+a[r-i-1][i];
}
if (r%2!=0)
{ans=ans-a[(r-1)/2][(r-1)/2];
}
cout<<"Sum of Diagonal Elements is:"<<ans;
getch();
}