Ответ:
#include <cmath>
#include <iostream>
double calculate_amperage(double p, double r)
{
return sqrt(p/r);
}
int main()
double p1,p2, r1, r2, i1, i2;
std::cin >> p1 >> p2 >> r1 >> r2;
i1 = calculate_amperage(p1, r1);
i2 = calculate_amperage(p2,r2);
std::cout << "i1 = " << i1 << ", i2 = " << i2 << std::endl;
https://pastebin.com/rs4G8jug
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <cmath>
#include <iostream>
double calculate_amperage(double p, double r)
{
return sqrt(p/r);
}
int main()
{
double p1,p2, r1, r2, i1, i2;
std::cin >> p1 >> p2 >> r1 >> r2;
i1 = calculate_amperage(p1, r1);
i2 = calculate_amperage(p2,r2);
std::cout << "i1 = " << i1 << ", i2 = " << i2 << std::endl;
}
https://pastebin.com/rs4G8jug