Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
504 B
2
Indexable
Never
#include <iostream>
using namespace std;
double func(double w, double l, double k, unsigned long long rez)
{
	double news, newk, s = w * l;
	if (w * l > 100)
	{
		s -= 100;
		news = (w * l) - 100;
		newk = (k * 0.9);
		rez = k * 100;
		rez = rez + (s * (k * 0.9));
	}
	else rez = s * k;
	return rez;

}
int main()
{
	double n, w, l, k; cin >> n;
	unsigned long long rez = 0;
	while (n != 0) {
		cin >> w >> l >> k;
		n--;
		rez = func(w, l, k, rez);
		cout << rez << endl;
	}
}