Hey there! I'm happy to help!
Our angle is facing the 2 foot high landing. This is the opposite side of the angle. We also have the ramp, which is the hypotenuse. The sine is the opposite over the hypotenuse. Since we have these two, we find the [tex]sin^-^1[/tex] to give the the angle.
[tex]sin^-^1(2/24)=4.780191847....[/tex]
This angle is about 5 degrees and it is in compliance with the building code because it is not greater than 5 degrees.
Have a wonderful day! :D