Sunday, August 19, 2018

SWAPPING

  • Problem Description

    Your task is to write a code to swapping of two numbers 
    Input:
    Input should contain the value of the limit n
    Output:
    It should print the Sum of series upto n limit
  • CODING ARENA::
  • #include <stdio.h>
    int main()
    {
      int a,b,t;
      scanf("%d%d",&a,&b);
      t=a;
      a=b;
      b=t;
      printf("%d %d",a,b);

    return 0;
    }
  • Test Case 1

    Input (stdin)
    12 89
    
    
    Expected Output
    89 12
  • Test Case 2

    Input (stdin)
    45 78
    
    
    Expected Output
    78 45

No comments:

Post a Comment