Đăng nhập để hỏi chi tiết


Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
double a,b,t1,t2;
cin>>a>>b;
t1=(pow(a,2)+pow(b,2))/2;
t2 =(abs(a)+abs(b))/2;
cout<<fixed<<setprecision(6)<<t1<<endl;
cout<<fixed<<setprecision(6)<<t2<<endl;
return 0;
}Hãy giúp mọi người biết câu trả lời này thế nào?
/**
* author: cody
* created: 10.08.2024 08:07
**/
#include <bits/stdc++.h>
using namespace std;
main() {
double a, b;
cin >> a >> b;
cout << setprecision(6) << fixed;
cout << (a * a + b * b) / 2 << '\n' << (a + b) / 2;
return 0;
}
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin