Hello Programmers,
The solution for codechef Find Remainder problem is given below.
Problem Link:- https://www.codechef.com/problems/FLOW002
/*
* Author:- Rahul Malhotra
* Source:- Programming Vidya
* Description:- Solution for Codechef FLOW002 problem
* Problem Link:- https://www.codechef.com/problems/FLOW002
* Website:- www.programmingvidya.com
*/
#include<iostream>
using namespace std;
int main()
{
// * Initializing variables
int t, a, b;
// * Accepting the number of test cases
cin>>t;
// * For each test case, displaying the remainder when a is divided by b
while(t--)
{
cin>>a>>b;
cout<<a%b<<endl;
}
return 0;
}
Happy Coding..!!