1 solutions
-
0
C :
#include<stdio.h> #define PI 3.1415926 void main() { double r; scanf("%lf",&r); printf("%.2f\n",PI*r*r); printf("%.2f\n",2*PI*r); }C++ :
#include<iostream> using namespace std; const float pi(3.1415926); int main() { float r,s,c; cin>>r; s=pi*r*r; c=2*pi*r; cout.precision(2); cout.setf(ios::fixed); cout<<s<<endl; cout<<c<<endl; //system("pause"); return 0; }Pascal :
program aa; var a,b,c,d,e:real; begin read(a); b:=3.1415926; c:=a*a*b; d:=a*2*b; write(c:0:2); writeln; write(d:0:2); end.
- 1
Information
- ID
- 19215
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By