View Code of Problem 64

#include<iostream>
using namespace std;
int main()
{
	int n,k,l,a;
	while(cin>>n>>k>>l&&(n!=0||k!=0||l!=0))
	{
		n--;
		while(k<=l&&n--)
		{
			a=k;
			k=k-k/2+k;
		}
		cout<<a<<endl;
	}
}

Double click to view unformatted code.


Back to problem 64