Advertisement
rengetsu

ProcedurProgramavimas_1.09

Feb 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <math.h>
  4. #include <iomanip>
  5. #include <conio.h>
  6. #include <cmath>
  7.  
  8. using namespace std;
  9. int main()
  10. {
  11.     long double q, b, p, pi;
  12.     pi=3.14159265359;
  13.     cin >> q;
  14.     cin >> b;
  15.     if (b>q){
  16.     p=pi*(q/2)*(q/2);
  17.    }else{
  18.     p=pi*(b/2)*(b/2);
  19.    }
  20.    cout <<fixed<<setprecision(2)<< p <<endl;
  21.    return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement