Last active
October 15, 2020 11:14
-
-
Save gunavaran/3a064da120ba1612be31bbb2e7be7d33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//courtesy of MIT Open Courseware (https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-172-performance-engineering-of-software-systems-fall-2018/lecture-slides/MIT6_172F18_lec2.pdf) | |
#include <math.h> | |
void orrery (){ | |
const double radius = 6371000.0; | |
const double diameter = 2 * radius; | |
const double circumference = M_PI * diameter; | |
const double cross_area = M_PI * radius * radius; | |
const double surface_area = circumference * diameter; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment