Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main(){
- setlocale(LC_ALL, "Rus"); // устанавливаем локаль системы, чтобы печатать русские символы
- double S, p, n, m, R;
- cin >> S >> n >> m;
- for (int p = 1; p < 101; ++p) {
- double r = p / 100;
- if (m == (S * r * pow(1 + r, n)) / (12 * (pow(1 + r, n) - 1))) {
- cout << r;
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement