1 solutions

  • 0
    @ 2025-11-5 19:33:33

    C :

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

    C++ :

    #include "stdio.h"
    #define swap(a,b) tem=a;a=b;b=tem;
    int main(int argc, char* argv[])
    {
    	int tem,a,b;
    	while(~scanf("%d%d",&a,&b))
    	{
    	  swap(a,b);
    	  printf("%d %d\n",a,b);
    	}
    	return 0;
    }
    
    • 1

    Information

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