It’s given that,
Number of cartons of coke cans = 144
Number of cartons of Pepsi cans = 90.
So, the greatest number of cartons in a stack can be found by finding the H.C.F. (144, 90).
Thus, by applying Euclid’s division lemma on 144 and 90, we get
144 = 90 x 1 + 54
90 = 54 x 1 + 36
54 = 36 x 1 + 18
36 = 18 x 2 + 0 (only in this stage the remainder becomes 0)
∴ the H.C.F. should be the last divisor i.e., 18.
Hence, the greatest number of cartons together in one stack is 18.