// program to print the product of all the multiples of 5 from 5 // to the entered number. #include using namespace std; int main() { int number; int counter; int product; cout << "Enter a positive number -- "; cin >> number; // using a while loop product = 1; counter = 5; while (counter <= number) { product = product * counter; counter = counter + 5; } cout << "The product of all multiples of 5 from 5 to " << number << " is " << product << endl; // using a do-while loop product = 1; counter = 5; do { if (counter <= number) { product = product * counter; counter = counter + 5; } } while (counter <= number); cout << "The product of all multiples of 5 from 5 to " << number << " is " << product << endl; // using a for loop product = 1; for(counter = 5; counter <= number; counter+=5) product = product * counter; cout << "The product of all multiples of 5 from 5 to " << number << " is " << product << endl; return 0; }