//1000 bottles issues
#include
<stdio.h>
void
Bottle(int,int);
void
Media(int, int);
int
total;
void
main(int argc, char* argv[])
{
Media(1000,3);
}
void
Media(int remain, intn)
{
total = remain;
Bottle(remain, n);
}
void
Bottle(int remain, intn)
{
if(remain < n)
{
printf(
"Remain:%d,Total:%d", remain,total);
}
else
{
total += remain/n;
Bottle(remain/n+remain%n, n);
}
}