fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double r,d, pi=3.141592654;
  10. double wynik;
  11. for (int a=0; a<20; a++)
  12. {
  13. cin >> r >> d;
  14. wynik=((r*r)-((d*d)/4))*pi;
  15. cout << fixed << setprecision(2) << wynik << endl;
  16.  
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00