Question -
Given two numbers , your task is to calculate the remainder.
Example -
Input : 2, 3
Output : sum is : 2
Input : 45, 10
Output : sum is : 5
Approach -
we solve this question with the help of basic maths.
Implementation -
#include <stdio.h>
int main()
{
int num1,num2,rem;
printf("Enter first numbers : ");
scanf("%d",&num1);
printf("Enter second numbers : ");
scanf("%d",&num2);
rem=num1%num2;
printf("Remainder is : %d",rem);
return 0;
}
Comments
Post a Comment