Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int N, b, q, n, i;
- int x = 1;
- cout << "Введите первый член b= " << " " << "Введите знаменатель q=" << " " << " Введите номер n=" << endl;
- cin >> b>> q >> n;
- cout << "Задача с циклом" << endl;
- for (i = 0; i < n; i++)
- {
- x = x * q;
- N = b * x;
- }
- cout << "Энный член N " << N << endl ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement