Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
427 B
13
Indexable
#include <iostream>
#include <cmath>

using namespace std;

int main() {
    double banKinh;
    

    cout << "Nhap ban kinh cua duong tron: ";
    cin >> banKinh;

    
    double chuVi = 2 * M_PI * banKinh; 
    double dienTich = M_PI * pow(banKinh, 2); 

    
    cout << "Chu vi cua duong tron la: " << chuVi << endl;
    cout << "Dien tich cua duong tron la: " << dienTich << endl;

    return 0;
}