Friday, May 3, 2019

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

Parity

Problem Description Ram and Sita playing the parity game. Two types of parity are there. One is odd parity and next is even parity. Ram will...