Wished Input ->
"Enter a word: program"
"Enter a postion to know where to start cutting: 2"
"Enter the following quantity to end up: 4"
Wished Output ->
ogra
This is my code, but I don't know how to insert values into a different array
#include <stdio.h>
#include <string.h>
int main (){
char word[100], cutword[50];
int on, off, i, j;
printf("Entra a word: ");
gets(word);
printf("Enter a postion to know where to start cutting: ");
scanf("%d", &on);
printf("Enter the following quantity to end up: ");
scanf("%d", &off);
for (i = 0; i<strlen(word); i++){
if (i >= on && i <= off) ¿cutword[]? = word[i];
}
for (j = 0; j<strlen(cutword); j++){
printf("%c", cutword[j]);
}
}