Untitled

Anonymous
plain_text
10/23/2022 12:26 PM
244 B
18
Indexable
#include <iostream>
using namespace std;
int main()
{
	int a, b, c, d;
	cin >> a >> b >> c;
	d = a;
	for (int i = 0; i < c-1; i++)
	{
		d = d + (b - a);
	}
	cout << d;
}
Editor is loading...