Skip to content

Instantly share code, notes, and snippets.

@renorram
Created August 18, 2020 22:55
Show Gist options
  • Save renorram/0facebcfd78b9a85da900ea4d4446027 to your computer and use it in GitHub Desktop.
Save renorram/0facebcfd78b9a85da900ea4d4446027 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main() {
double r = 0, pi = 3.14159;
char buffer[100];
fgets(buffer, 100, stdin);
r = strtod(buffer, NULL);
printf("A=%.4f\n", pi * (r * r));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment