SHARE
TWEET

Untitled

a guest Oct 21st, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 << "Введите первый член b= " << " " << "Введите знаменатель q=" << " " << " Введите номер n=" << endl;
  10.     cin >> b>>  q >> n;
  11.     cout << "Задача с циклом" << endl;
  12.     for (i = 0; i < n; i++)
  13.     {
  14.         x = x * q;
  15.         N = b * x;
  16.     }
  17.         cout << "Энный член N  " << N   << endl ;
  18.     return 0;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top