+ 1

Writing pythagorean calculator to solve for b

I cannot seem to get this to work. I don't know if it's syntax or a logic error on my part. It should take input of shooters distance and elevation and give true flat distance. B^2 = c^2-a^2. Also would like to input the angle theorem as well. https://code.sololearn.com/c048bNR4bf2r/?ref=app

7th Feb 2019, 8:57 PM
jon
1 Réponse
+ 3
#include <math.h> ~~~ printf("\nPlease enter the observed distance to target and elevation above: "); scanf("%f %f", &c, &a);
7th Feb 2019, 9:29 PM
Anna
Anna - avatar