+ 1

How can I solve time dilation problems of physics in C , the problem is no of digits in the speed of light.

https://code.sololearn.com/civjYO98Lf83/?ref=app here is my attempt ,i always get nan or 0 or 1 as output. Formula goes like this T=t/√1-(v²/c²) where v and c take large values.

5th Jul 2020, 4:35 PM
Varun N
Varun N - avatar
2 Réponses
+ 1
You forgot parenthesis around v*v and c*c
5th Jul 2020, 5:11 PM
Dennis
Dennis - avatar
0
Dennis sir thanks for the help it fixed my problem now the code is working.
5th Jul 2020, 5:27 PM
Varun N
Varun N - avatar