Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
using namespace std; #define PI 3.1415926 #define pTwo(x) x*x struct Circle{ double radius; }; struct Ring{ Circle c1, c2; }ring; double area(Ring ring){ return PI*pTwo(ring.c2.radius) - PI*pTwo(ring.c1.radius); } int main(){ double startX, startY, smallRadius, largeRadius; while(cin >> startX >> startY >> largeRadius >> smallRadius){ ring.c1.radius = smallRadius; ring.c2.radius = largeRadius; cout << fixed << setprecision(6) << "Area: " << area(ring) << endl; } return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)