- 题目描述:输入若干整数,以空格间隔,要求反转字符序列并打印输出。
如:
- 题目描述:输入若干整数,以空格间隔,要求反转字符序列并打印输出。
Input: 12 3 456 6789
Output: 6789 456 2 12
源代码:
方法一、使用栈存储
1 | #include<iostream> |
方法一、使用数组变换存储
1 | #include<bits/stdc++.h> |
Input: 12 3 456 6789
Output: 6789 456 2 12
源代码:
方法一、使用栈存储
1 | #include<iostream> |
方法一、使用数组变换存储
1 | #include<bits/stdc++.h> |