Skip to content

Instantly share code, notes, and snippets.

Last active January 19, 2021 22:52
What would you like to do?
#include <stdio.h>
#include <cs50.h>
#define PI 3.14 // declaring what is known as a macro or macro definition
int main(void) {
float circumference, radius;
circumference = get_float("Find the radius of a circle by entering it's circumference: ");
while(circumference <= 0);
radius = circumference / (2 * PI);
printf("Radius is equal to %.2f\n",radius);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment