How can I fix my program that subtracts angles? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I fix my program that subtracts angles?

https://code.sololearn.com/Wb18OS2GJECx The code can subtract angles so long as no negative angles are involved. How do I allow negative angles without the program having a stroke? Also, I'm a new programmer. What are some ways I can make my program more professional?

20th Jan 2020, 2:52 PM
Michael
1 Answer
+ 1
When compiling the angle subtract m/60, s/3600 rather than add them if angle is negative Use the absolute value of the subtraction result to display deg min sec then just prepend the '-' sign if the ans is negative.. https://code.sololearn.com/WebXT2H4UtN6/?ref=app
20th Jan 2020, 6:47 PM
Mahmud Nabil
Mahmud Nabil - avatar