Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135660 hjx1 字符串反转 C++ Compile Error 0 MS 0 KB 470 2025-11-08 11:11:56

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int i,j,k,t; char a[1000]; cin>>t; i=1; while (i<=t) { cin>>a; j=0; while (j<strlen(a)) { k=j; while (a[j]!=' ') j++; f=j+1; j--; while (j>=k) cout<<a[j--]; cout<<" "; j=f; } i++; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         while (j