#include <unistd.h>
#include <stdio.h>
void ft_putchar(char c)
{
write(1, &c, 1);
}
void repeat_alpha(char *str)
{
int temp;
int i;
int j;
temp = 0;
i = 0;
j = 1;
while (str[i])
{
temp = str[i] - 'a' + 1;
while (j <= temp)
{
ft_putchar(str[i]);
j++;
}
j = 1;
i++;
}
}
int main(int argc, char **argv)
{
int i;
i = 1;
while (argc > 1 && argv[i])
{
repeat_alpha(argv[i]);
ft_putchar('\n');
i++;
}
return (0);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: