my code looks 1:1 like this : you may disregard the ft_strlen function
#include <unistd.h>
#include <stdio.h>
int ft_strlen(char *c)
{
int i = 0;
while(c[i] != '\0')
{
i++;
}
return i;
}
int main()
{
char rockPaperScissores[] = "THIS IS rockPaperScissores^tm: ";
int rps = ft_strlen(rockPaperScissores);
printf("%d\n", rps);
write(1, rockPaperScissores, rps);
write(1, "LETS PLAY!!!\n", 13);
for (int i = 51; i >= 49; i--)
{
write(1, &i , 1);
write(1, "\n" , 1);
}
return 0;
}
and my OUTPUT looks like this :
THIS IS rockPaperScissores^tm: LETS PLAY!!!
3
2
1
31
my question now being...why is the "31" as last in my output when it should have been the first. Thanks for helping.