delete pics to save space
This commit is contained in:
27
history_source/ccf 入门篇/U4/4.3.4.cpp
Normal file
27
history_source/ccf 入门篇/U4/4.3.4.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include<iostream>
|
||||
#include<string>
|
||||
#include<sstream>
|
||||
#include<cmath>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
stringstream num;
|
||||
string j;
|
||||
int a,b;
|
||||
bool z,x;
|
||||
while(true)
|
||||
{
|
||||
cin>>a;
|
||||
z=0;
|
||||
if(a<0){z=1;a=abs(a);}
|
||||
b=0;
|
||||
do
|
||||
{
|
||||
b=b*10+a%10;
|
||||
a/=10;
|
||||
}while(a>0);
|
||||
a=b;
|
||||
if(z==1) a=0-a;
|
||||
cout<<a<<endl;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user