Sunday, August 19, 2018

ADDING TWO NUMBERS

  • Problem Description

    Add two numbers using pointers
  • CODING ARENA::
  • #include <stdio.h>
    int main()
    {
      int a,b,c;
      scanf("%d%d",&a,&b);
      c=a+b;
      printf("The sum of the entered numbers is=%d",c);

    return 0;
    }
  • Test Case 1

    Input (stdin)
    5
    
    4
    
    
    Expected Output
    The sum of the entered numbers is=9
  • Test Case 2

    Input (stdin)
    9
    
    10
    
    
    Expected Output
    The sum of the entered numbers is=19

No comments:

Post a Comment