#include <iostream>
using namespace std;

int main()
{
   int a; cin >> a;
   cout << "a: " << a << endl;
   int b; cin >> b;
   cout << "b: " << b << endl;
   int n; cin >> n;
   cout << "n: " << n << endl;
    
   int count = 0;
   for(int i = a; i <= b; i++) {
       if (i % n == 0) {
           count++;
       }
   }
   cout << "count: " << count << endl;

   return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: