Problem Description
Bheem has two numbers, he wants to know the modulous value of those two numbers.
Your task is to write a c Program to calculate the modulus of two given numbers.Input the negative numbers and view the output for different test casesCODING ARENA
#include <stdio.h>
int main()
{
int a,b,c;
scanf("%d%d",&a,&b);
c=a%b;
printf("%d",c);
return 0;
}
Test Case 1
Input (stdin)100 93
Expected Output7
Test Case 2
Input (stdin)200 12
Expected Output8
No comments:
Post a Comment