+ 1
Can someone help with extra-terrestial question?.test case 3 not getting all other test cases are correct
#include <stdio.h> #include<string.h> int main() { char str[30]; fgets(str,30,stdin); int length,i,temp; length=strlen(str); for(i=0;i<(length /2);i++){ temp=str[i]; str[i]=str[length-1-i]; str[length-1-i]=temp; } printf("%s",str); return 0; }
3 Respuestas
+ 3
Increase size of chat array..
The input may be beyond length 30. try 50
+ 2
Jayakrishna 🇮🇳 thanks it worked
0
text=input()
print(text[::-1])
#it can help