diff --git a/count.cpp b/count.cpp new file mode 100644 index 0000000..8e52cd2 --- /dev/null +++ b/count.cpp @@ -0,0 +1,13 @@ +int solve(int A, int B, int C, int D) { + + int temp = C, count = 0; + if(C%D != 0){ + temp+=D; + temp -=((C)%D); + } + while(temp <= B-A){ + temp += D; + count += 1; + } + cout<< count; +}