diff --git a/bharat/main.cpp b/bharat/main.cpp new file mode 100644 index 0000000..4fd6536 --- /dev/null +++ b/bharat/main.cpp @@ -0,0 +1,64 @@ +// +// main.cpp +// Codeforces_Div 637 +// +// Created by Bharat on 04/09/20. +// Copyright © 2020 Bharat Tandon. All rights reserved. +// + +#include +#include +#include +using namespace std; + +int main() { + int t; + cin>>t; + + while(t--){ + int a,b,i=0,j=0,k,p,z,l; + cin>>a>>b; + + if(b > a){ + while(a != b){ + + if(1<=b-a && b-a<= 10){ + a = a + (b-a); + i++; + } + else if(b-a > 10){ + z = b-a; + k = z/10; + a = a + (10*k); + + i = i+k; + } + + } + cout< 10){ + l = a-b; + p = l/10; + a = a - (10*p); + + j = j+p; + } + + } + cout<