Polnochniy

Untitled

Feb 5th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. setlocale(LC_ALL, "Russian");
  7. int N, b, q, n, i;
  8. int x = 1;
  9. cout << "Введите первый член " << " " << "Введите знаменатель " << " " << " Введите номер энного члена" << endl;
  10. cin >> b >> q >> n;
  11. for (i = 0; i < n; i++)
  12. {
  13. x = x * q;
  14. N = b * x;
  15. }
  16. cout << "Энный член равен << endl;
  17. cout << N << endl;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment