⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
DragonFlyBSD
All Projects
DragonFlyBSD
Overview
Activity
Roadmap
Issues
Documents
Files
Repository
Download (359 Bytes)
Bug #2734
ยป stoitest.cpp
phma
, 11/12/2014 03:56 PM
#include
<cstdio>
#include
<iostream>
#include
<string>
using
namespace
std
;
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
k
;
char
buf
[
16
];
string
str
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
sprintf
(
buf
,
"%d"
,
i
);
str
=
string
(
buf
);
for
(
j
=
0
,
k
=
str
.
length
()
-
1
;
j
<
k
;
j
++
,
k
--
)
swap
(
str
[
j
],
str
[
k
]);
j
=
stoi
(
str
);
cout
<<
i
<<
' '
<<
j
<<
endl
;
}
return
0
;
}
(1-1/1)
Loading...