1 solutions

  • 0
    @ 2025-11-5 15:17:56

    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

    Information

    ID
    16623
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By