GeNtlE
|
Posted: Fri May 27, 2005 11:16 Post subject: |
|
|
mramor wrote: | и зачем там math.h?.. | Наверно человек хотел использовать abs(). Code: | #include<iostream.h>
void main()
{
const int nstr=5, nstb=5;
int b [nstr][nstb];
int i, j, sum, end;
for(i=0; i<nstr; i++)
for(j=0; j<nstb; j++)
cin>>b[i][j];
for (i=0; i<nstr; i++)
{
sum=0;
for(j=0; j<nstb; j++)
{
if(b[i][j]<0),
end=1;
sum+=b[i][j];
};
if(end)
cout<<sum<<endl;
end=0;
};
}; |
_________________ Новые версии SM2BT здесь. |
|