Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Помогите плизз!!! 
Author Message
GeNtlE



PostPosted: Fri May 27, 2005 11:16    Post subject: Reply with quote

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 здесь.
View user's profile Send private message Send e-mail Visit poster's website ICQ Number


Powered by phpBB © 2001, 2005 phpBB Group