

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
C++ :
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float R;
cin >> R;
cout<< fixed <<setprecision(1) << R * 2 * 3.14 << endl;
cout<< fixed <<setprecision(1) << R * R * 3.14;
return 0;
}
Python :
R = int(input())
print(format(R * 2 * 3.14, ".1f"))
print(format(R * R * 3.14, ".1f"))
Hãy giúp mọi người biết câu trả lời này thế nào?
#include <bits/stdc++.h>
using namespace std;
const int n=3.14;
float r,cv,dt;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>r;
cv=(r*2)*n;
dt=(r*r)*3.14;
cout<<fixed<<setprecision(1)<<cv<<endl;
cout<<fixed<<setprecision(1)<<dt<<endl;
}
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin