Hey I need to get to this result at the end:
As you can see when you run the code it won't print the full word like "aaa", it would print each letter on its own.
And I need to complete the code where it's (1) (2) (3)
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define n 3
void what(char* string);
int main()
{
char s[4] = { 'a', 'a', 'a', 0 };
int i, j, t;
t = n * n * n;
while (t--)
{
for (i = 0; i < n - 1; i++)
printf("%1c\n", s[i]);
printf("%1c\n", s[i]);
if (++s[n - 1] > 'c')
{
(1); //In my opinion it's s[???]++; not sure if that's the right solution I also don't know what to put inside the [].
for (j = (2) ; j >= 0; j--) //In my opinion it's - j=2
{
if (3) // In my opinion it's - if (s[j] == 'd')
s[j] = 'a';
else break;
}
}
}
}
