There are 100 chickens and rabbits in total, and the number of legs of chickens is 30 less than that of rabbits. How many of them are there? It's 28 less

There are 100 chickens and rabbits in total, and the number of legs of chickens is 30 less than that of rabbits. How many of them are there? It's 28 less

Suppose there are x chickens, then there are 100-x rabbits
2x+28=4×(100-x)
2x+28=400-4x
6x=372
x=62
100-62=38