1 solutions

  • 0
    @ 2025-11-5 18:58:39

    C++ :

    #include<iostream>
    using namespace std;
    char from[100],to[100];
    void solve(char *p,int n,char *q)
    {
    	p+=n-1;
    	while (*q++=*p++) ;
    }
    int main()
    {
    	int n,m;
    	cin>>n;
    	for (int i=0; i<n; i++) cin>>from[i];
    	cin>>m;
    	solve(from,m,to);
    	cout<<to<<endl;
    	return 0;
    }
    
    • 1

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

    Information

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