1 solutions

  • 0
    @ 2024-12-4 19:37:02

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<cstring>
    using namespace std;
    char s[101];
    void change(char s[])
    {
    	int len=strlen(s);
    	for (int i=0,j=len-1; i<j; i++,j--)
    		{ char c=s[i]; s[i]=s[j]; s[j]=c; }
    }
    int main()
    {
    	cin>>s;
    	change(s);
    	cout<<s<<endl;
    	return 0;
    }
    
    • 1

    C语言程序设计教程(第三版)课后习题8.5

    Information

    ID
    2207
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By