Canna

Tuesday, 25 September 2018

Subtraction of numbers(Integer data type)

  • Problem Description

    Jennys home work for Second day is to find subtraction of two numbers, help jenny to solve the problem.
  • Test Case 1

    Input (stdin)
    6
    
    2
    
    
    Expected Output
    The Subtraction of two number is:4
  • Test Case 2

    Input (stdin)
    -5
    
    5
    
    
    Expected Output
    The Subtraction of two number is:-10
  • Program
  • #include <stdio.h>
    int main()
    {
      int a,b,sub;
      scanf("%d",&a);
      scanf("%d",&b);
      sub=a-b;
      printf("The Subtraction of two number is:%d",sub);
     return 0;
    }

No comments:

Post a Comment

Note: only a member of this blog may post a comment.