Thursday, 6 April 2017

Geeksforgeeks Solution For " Divisible Numbers "

GeeksforGeeks Solution For Hard Domain .Below You Can Find The Solution Of  School Basic ,Easy ,Medium . Or Hackerrank Solution You Can Also Direct Submit Your Solution to Geeksforgeeks Same Problem .You Need to login then you can submit you answers 

Problem :- Divisible Numbers 

Submit Your Solution :- Click Here 

Solution :- 

#include <iostream>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
       int a,b,i,c;
       cin>>a>>b;
       c=a%b;
       b-=c;
       a+=b;
       cout<<a<<endl;

    }
    return 0;
}

Output:-



Geeksforgeeks Solution For " Divisible Numbers "

No comments:
Write comments

Recommended Posts × +