Computer Science, asked by natarajvcnc, 5 months ago

Algorithm of multiplying three number in an program​

Answers

Answered by himanshu2006vps
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