1 条题解

  • 0
    @ 2021-6-15 10:13:24

    C :

    #include<stdio.h>
    int main()
    {
    	int n;
    	scanf("%d", &n);
    	int a, b, c, d;
    	d = n / 1000;
    	c = n / 100 % 10;
    	b= n % 100 / 10;
    	a = n % 10;
    	printf("%d%d%d%d", a,b,c,d);
    	return 0;
    }
    
    

    C++ :

    #include <cstdio>
    //#include <cstdlib>
    int main(){
      int n;
      scanf("%d", &n);
      printf("%d%d%d%d\n", n%10, n/10%10, n/100%10,n/1000);
    //system ("pause");
      return 0;
    }
    

    Pascal :

    var ch:array[0..5] of char;
        i:longint;
     begin
       for i:=1 to 4 do read(ch[i]);
       for i:=4 downto 1 do write(ch[i]);
      end.
      
    
    • 1

    信息

    ID
    444
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者