This is a question when I participated a recent interview, I think it interesting. Let's say int n=10;
Input : An array int a[10];
Output: An array float b[10];
Requirement:
b[0]= a[1]*a[2]*...a[9]; // product of all numbers in a, other than a[0];
b[1]= a[0]*a[2]*...a[9]; // product of all numbers in
…
Discussion (0)