Horje
how to find product of a given numbers in c++ Code Example
how to find product of a given numbers in c++
#include<iostream>

using namespace std;

int main()
{
	int number, reminder, digitProduct = 1;
	
	cout << "\nPlease Enter the Number to find the Digits Product =  ";
	cin >> number;
	
	while (number > 0)
	{
    	reminder = number % 10;
    	digitProduct = digitProduct * reminder;
    	number = number / 10;
    	
    	cout << "\nDigit = " << reminder << " and the Digit Product = " << digitProduct;
	}
	cout << "\n\nThe Product of all Digits in a given Number = " << digitProduct;
		
 	return 0;
}




Cpp

Related
assignment operator with pointers c++ Code Example assignment operator with pointers c++ Code Example
c++ while loop Code Example c++ while loop Code Example
dynamic memory in c++ Code Example dynamic memory in c++ Code Example
Inner Section Sticky Scroll in elementor Code Example Inner Section Sticky Scroll in elementor Code Example
std::map get all keys Code Example std::map get all keys Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11