#include <bits/stdc++.h>
using namespace std;
int main()
{
float a,b,s,d;
cin>>a>>b;
d=sqrt(a*a+b*b);
s=a*b;
cout<<"Do dai duong cheo la:"<<fixed<<setprecision(2)<<d<<endl;
cout<<"Dien tich la:"<<fixed<<setprecision(2)<<s;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n;
double S;
cin >> n;
for(int i=1; i<=n; i++)
S+=1.0/i;
cout << double(S) << endl;
return 0;
}
Chúc bn học tốt!