Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- int a, b;
- int rez = 1;
- cout << "Введите диапазон " << endl;
- cin >> a >> b;
- for (int i = a; i <= b; i++)
- rez = rez * i;
- cout << " Результат произведения чисел от а до b равен = " << rez << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment