Polnochniy

Untitled

Nov 6th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. setlocale(LC_ALL, "rus");
  6. int a, b;
  7. int rez = 1;
  8. cout << "Введите диапазон " << endl;
  9. cin >> a >> b;
  10. for (int i = a; i <= b; i++)
  11. rez = rez * i;
  12. cout << " Результат произведения чисел от а до b равен = " << rez << endl;
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment