Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
310 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	int a, b , c;
	a = 1;
	b = 1;
	c = 1;
	setlocale(LC_ALL, "RUS");
	cout << "Введите число >0 или придет конец" << endl;
	while (a)
	{
		cin >> a;
		if (a > 0) b *= a;
		else a = 0;
		
	}
	cout << b << endl;

}