示例#1
0
void			ft_print_str_tab(char **tab)
{
	int			i;
	static int	len = 0;
	static int	high = 0;

	if (!high)
		high = ft_len_str_tab(tab);
	if (!len)
		len = ft_strlen(tab[0]);
	i = 0;
	while (tab[i] != NULL)
	{
		ft_putstr(tab[i]);
		write(1, "\n", 1);
		i++;
	}
	print_last_line(len);
}
示例#2
0
int main(){
	int us_N=0;
	char us_ch=0;
	int col=0, row=0;
	int i=0;

	scanf("%d %c", &us_N, &us_ch);
	col = us_N;
	if(col%2)
		row = col/2 + 1;
	else
		row = col/2;

	print_first_line(col, us_ch);
	print_middle_lines(col, row, us_ch);
	print_last_line(col, us_ch);

	return 0;
}