第4个点错了,求助

P1914 小书童——凯撒密码

庄宇寒 @ 2016-06-02 13:05:35

#include<stdio.h>
#include<string.h>
char a[124],i,n,l;
main()
{
    scanf("%d",&n);
    scanf("%s",a);
    l=strlen(a);
    for(i=0;i<l;i++)
    {
        n=n%26;
        a[i]=a[i]+n;
        while(a[i]>122)a[i]=a[i]-26;
        printf("%c",a[i]);
    }
    return 0;
}

by james1213 @ 2016-06-02 20:17:43

看不懂


by 1023003660h @ 2016-07-15 10:13:53

我也是这么写的,为什么错了?


by tukepan30120 @ 2016-08-18 18:03:19

int main()


by Aimyhtixela @ 2016-08-30 18:55:00

Mod, don't forget.


|