Divide every element of one array by other array elements | C # program to find quotient of array elements ; Function to calculate the quotient of every element of the array ; Calculate the product of all elements ; To calculate the quotient of every array element ; Driver code
using System ; class GFG { static void calculate ( int [ ] a , int [ ] b , int n , int m ) { int mul = 1 ; for ( int i = 0 ; i < m ; i ++ ) if ( b [ i ] != 0 ) mul = mul * b [ i ] ; for ( int i = 0 ; i < n ; i ++ ) { int x = ( int ) Math . Floor ( ( double ) ( a [ i ] / mul ) ) ; Console . Write ( x + " ▁ " ) ; } } public static void Main ( ) { int [ ] a = { 5 , 100 , 8 } ; int [ ] b = { 2 , 3 } ; int n = a . Length ; int m = b . Length ; calculate ( a , b , n , m ) ; } }