a chemist decomposes 2.490g Ni and 10.762g I. What is empirical formula of the compound?

a chemist decomposes 2.490g Ni and 10.762g I. What is empirical formula of the compound?

2.49/58.7 = about 0.42
10.76/126.9 = about 0.84
Find the ratio. It should be obvious that I is twice Ni so formula is NiI2.