Thursday, September 13, 2018

APPLE VENDOR

  • Problem Description

    Helen wants to find the sum of apples in 2 baskets that she is carrying to the market. You need to write a C program to help her find the total number of apples. Use functions in C to write this program.
  • CODING ARENA
  • #include <stdio.h>
    int main()
    {
      int a,b,s;
      scanf("%d%d",&a,&b);
      s=a+b;
      printf("%d",s);
    return 0;
    }
  • Test Case 1

    Input (stdin)
    2 3
    
    
    Expected Output
    5
  • Test Case 2

    Input (stdin)
    6 7
    
    
    Expected Output
    13

No comments:

Post a Comment