C++ / gcc 7.3.0
#include <iostream>
#include <cmath>
int main()
{
float x, y, z;
std::cin >> x >> y >> z;
std::cout << "1. a = " <<
(x + y - z) / (std::pow(x, 2) + 2)
<< std::endl;
std::cout << "2. a = " <<
5 * (2 * x - z) / (3 + std::pow(y, 2))
std::cout << "3. a = " <<
(1 + z) * (x + (y / (std::pow(x, 2) + 4))) / (2 + (1 / (std::pow(x, 2) + 4)))
return 0;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
C++ / gcc 7.3.0
#include <iostream>
#include <cmath>
int main()
{
float x, y, z;
std::cin >> x >> y >> z;
std::cout << "1. a = " <<
(x + y - z) / (std::pow(x, 2) + 2)
<< std::endl;
std::cout << "2. a = " <<
5 * (2 * x - z) / (3 + std::pow(y, 2))
<< std::endl;
std::cout << "3. a = " <<
(1 + z) * (x + (y / (std::pow(x, 2) + 4))) / (2 + (1 / (std::pow(x, 2) + 4)))
<< std::endl;
return 0;
}