xiaopang666 @ 2023-09-15 09:01:42
#include<stdio.h>
int main()
{
long int a,b,i,k,n,sum=0;-
scanf("%d",&n);
for(i=0,sum=n%10,k=n;1;i++)
{
n=n/10;
if(n==0)break;
k=n%10;
sum=sum*10+k;
}
printf("%d",sum);
return 0;
}
by SLxyf_ac19oier_xint @ 2023-09-15 09:26:50
这咋有个-号
by Soojin2012 @ 2023-09-15 09:31:23
#include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b,i,k,n,sum=0;
cin>>n;
for(i=0,sum=n%10,k=n;1;i++) {
n=n/10;
if(n==0)break;
k=n%10;
sum=sum*10+k;
}
cout<<sum;
return 0;
}
这样就过了