예제 #1
0
void gauss(int i, int j)
{
  printab();
  if(i+1<rows && j+1<cols)
    {
      if(notnull(i,j)==rows)
	gauss(i,j+1);
      else
	{
	  if(!tab[j+i*cols])
	    {
	      rowswap(i,notnull(i+1,j));
	      gauss(i,j);
	    }
	  else
	    if(notnull(i+1,j)!=rows)
	      {
		rowdux(i,j,notnull(i+1,j));
		gauss(i,j);
	      }
	    else
	      gauss(i+1,j+1);
	}
    }
}
예제 #2
0
int main()
{
	int* tab = new int[10];
	generate(tab);
	printab(tab, 10);
	std::cout << "Minimalna wartosc: " << min(tab, 10) << std::endl;
	std::cout << "Maksymalna wartosc: " << max(tab, 10) << std::endl;
	std::cout << "Suma: " << suma(tab, 10);

	delete[] tab;
	return 0;
}
예제 #3
0
파일: setenv.c 프로젝트: cvrmj/bidon
void	callsetenv(t_data *data)
{
	int	i;

	i = 1;
	if (ft_strcmp(data->line, "setenv") == 0)
	{
		printab(data->env);
		return ;
	}
	while (data->args[i])
	{
		if (ft_strstr(data->args[i], "=") != NULL)
		{
			if (alreadyexist(data->env, data->args[i]) == 1)
				data->env = setenvifexist(data, i);
			else
				data->env = setenvifdontexist(data, i);
			data->turn = 1;
		}
		i++;
	}
}