@MicM
824 / 483 / 90
Регистрация: 29.12.2009
Сообщений: 1,106
|
26.11.2013, 23:07
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| #include <iostream>
#include <string>
void print (std::string str)
{
std::cout <<str[str.size()-1];
if (str.size()>0)
print (str.erase(str.size()-1,1));
}
int main()
{
std::string s = "one two three four";
print (s);
return 0;
} |
|
0
|