Algorithm of multiplying three number in an program
Answers
Answered by
0
/*Algorithm in Ç++*/
#include<bits/stdc++.h>
using namespace std;
/* Function to get product of digits */
int getProduct(int n)
{
int product = 1;
while (n != 0)
{
product = product * (n % 10);
n = n / 10;
}
return product;
}
// Driver program
int main()
{
int n = 4513;
cout << (getProduct(n));
}
n = 4513
print(getProduct(n))
Similar questions
English,
2 months ago
India Languages,
2 months ago
English,
5 months ago
Business Studies,
5 months ago
English,
11 months ago