Canna

Sunday, 23 September 2018

Division of numbers(Integer data type)

Problem Description

Jennys home work for Fourth day is to find Division of two numbers, help jenny to solve the problem.

  • Test Case 1

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

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

No comments:

Post a Comment

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