Disclaimer: Make sure you tried enough before checking the solution
Problem: https://codeforces.com/group/MWSDmqGsZm/contest/219432/problem/Q
#include<stdio.h> #include<string.h> int main(){ int a,i,b,j; char s[1000]; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%s",s); for(j=strlen(s)-1;j>=0;j--){ printf("%c ",s[j]); } printf("\n"); } return 0; }
Assiut University Training – Newcomers solution