Canna

Sunday, 23 September 2018

Modulo of numbers(Integer data type)

Problem Description

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

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

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

No comments:

Post a Comment

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