Header Ads

Header ADS

1002 - Area of a Circle | URI Online Judge Solution In C++

URI Online Judge Solution 1002| Beginner

Online Judge: URI ONLINE JUDGE
Problem Name: Area of a Circle 
Problem Category: Beginner
Problem Link:  


Solution in C++

// Solution in c++

  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4. int main()
  5. {    
  6.      double r,a = 0;  
  7.      cin>>r;    a = 3.14159 * r*r;
  8.     cout<<fixed<<setprecision(4)<<"A="<<a<<endl;
  9.     return 0;
  10. }



No comments

Powered by Blogger.