...求解

P1307 [NOIP2011 普及组] 数字反转

dspjf @ 2017-10-28 23:03:16

#include<stdio.h>
int main()
{
    int n;
    int s=0;
    int b=0;
    int a=0;
    scanf("%d",&n);
    if (n<0)
        n=0-n;
        a=1;
        for(i=0,i<10,i++);
        {
            int c=n/10;
            b=n-c*10;
            n=n/10;
            s=s+n;
            s=*10;
            {
            if (n<10)
                a=n;
                s=s+a;
                break;
            }
                {
                    if(a==1)
                        s=0-s;
                }
        }
        printf("%d\n",s);
        return 0;
}

不能输出两位数


by MioMioQ @ 2017-12-09 19:15:15

???????????????????????


|