#include <iostream>
#include <time.h>
#include <cstdlib>
using namespace std;
int main()
{
int A, B;
int sum = 0;
cout << "Input A ";
cin >> A;
cout << "Input B";
cin >> B;
for (int i = A; i < B; i++)
if ((i % 5 == 0) && (i > 0))
sum += i;
cout << i << endl;
}
cout << "Sum = " << sum << endl;
return 0;
#include <iostream>
#include <time.h>
#include <cstdlib>
using namespace std;
int main()
{
int A, B;
int sum = 0;
cout << "Input A ";
cin >> A;
cout << "Input B";
cin >> B;
for (int i = A; i < B; i++)
{
if ((i % 5 == 0) && (i > 0))
{
sum += i;
cout << i << endl;
}
}
cout << "Sum = " << sum << endl;
return 0;
}