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 , i;
- int rez = 1;
- cout << "Введите диапазон" << endl;
- cin >> a >> b;
- i = a;
- while (i <= b) {
- rez =rez* i;
- i++;
- }
- cout <<"Результат произведения от a до b равен " << " " << rez<< endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment