#include <stdio.h> #include <string.h> int main(){ char arr[100]; int i, j; scanf("%s", arr); for(i=0;i<strlen(arr);){ if(j=i;j<strlen(arr)-1;j++){ arr[j]=arr[j+1]; } else{ i++; } } printf("%s", arr); } /* Main.c: In function 'main': Main.c:9:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(j=i;j<strlen(arr)-1;j++){ ^ Main.c:9:11: error: expected ')' before ';' token if(j=i;j<strlen(arr)-1;j++){ ^ */ |
Double click to view unformatted code.