6 kyu

Missing Angle

241 of 754user5196477

Description:

Below is a right-angled triangle:

  |\
  | \
  |  \
  |   \ 
o |    \ h 
  |     \
  |    θ \
  |_______\ 
     a

Your challange is to write a function (missingAngle in C/C#, missing_angle in Ruby), that calculates the angle θ in degrees to the nearest integer. You will be given three arguments representing each side: o, h and a. One of the arguments equals zero. Use the length of the two other sides to calculate θ. You will not be expected to handle any erronous data in your solution.

Algorithms
Mathematics
Geometry

Stats:

CreatedDec 2, 2016
PublishedDec 2, 2016
Warriors Trained1493
Total Skips80
Total Code Submissions2879
Total Times Completed754
C# Completions98
C Completions269
Ruby Completions43
Crystal Completions6
CoffeeScript Completions13
Python Completions241
JavaScript Completions152
Total Stars39
% of votes with a positive feedback rating91% of 226
Total "Very Satisfied" Votes192
Total "Somewhat Satisfied" Votes28
Total "Not Satisfied" Votes6
Total Rank Assessments13
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user5196477 Avatar
  • GiacomoSorbi Avatar
  • Matteo.B Avatar
  • nekokat Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • saudiGuy Avatar
Ad