-1
// what changes I have to make to make each character repeat once more than the previous one?
for example: input: Roberto exit: Roobbbeeeerrrttttooooooooooo
#include <stdio. h> #include <string. h>
void main (){ char string[50]; int num, Eng;
printf("String inicial: ");
scanf("%s,", string);
printf("Numero: ");
scanf("%d", &num);
leng = strlen(string);
char stringFinal[leng*num];
printf("String final: ");
for (int i = 0; i < leng; i++){
for (int j = 0; j < num; j++){
printf("%c ", string[i]);
}
}
printf("\n");
}
GRATEFUL