1-First, take the word from the user, transfer it to an array, and perform the operations on this array. 2- As in the LED sign, when the letters are arranged in a way that they come to the end in each step, each My name needs to be written on the screen. 3-For loop should not be used in the program, loop operations should be done using do-while. 4- When the user presses 'E' or 'e' when the program is finished, the program should start again. 5- A ready-made function should not be used for any situation.
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> void GetString(char string[]) { int i=0; char ch; while((int)ch!=10) { ch = getc(stdin); string[i++] = ch; } string[i] = '\0'; } int main() { int i=0,k=0,j,z,m=0,n=0,a; char str[100],c; char str2[100]; do { printf("Enter the word :"); GetString(str); a=strlen(str); k=a; str2[k] = '\0'; for(j=k-1;j>=0;j--) { str2[j] = str[m