假如2015年房价80万,今年我大学毕业第一年月工资是2000元,我的年工资增长率应该至少是多少,到2015年才能买的起房.
用循坏做呀
我想可以这样吗?
for(i=0;i<=7;i++)
{年工资=年工资*(1+年增长率(求的))
if(年工资<=80万)
{break;}
}
不行该怎么算呀
int i = now;
bool isWinLottery = false;
while (i< you.deathDay)
{
if (isWinLottery)
{
you.bequeath = you.Money + Lottery.Money;
you.bequeath = you.bequeath + buyHouse(you);
you.bequeath = you.bequeath + marriage(you, yourGirl);
you.bequeath = you.bequeath + procreate(yourGirl);
you.bequeath = you.bequeath+ doSomeThing(yourFamily);
break;
}
else
{
isWinLottery= buyLottery();
};
i++;
};
you.lifeOver();
yourafterworld.bequeath = yourafterworld.bequeath + you.bequeath;
you.bequeath = 0;
beta1:忘记C/C++怎么写的了
beta2:还是没想起来C语法是不是这样写的,有空得复习一下,哎,学了就丢了,英语不会查字典
[此贴子已经被作者于2007-9-13 20:01:42编辑过]
//copy right@ anthony634 2007
int i = now;
bool isWinLottery = false; // 是否中奖
while (i< you.deathDay) // 到生命结束的那天
{
if (isWinLottery) // 如果中奖
{
you.bequeath = you.Money + Lottery.Money; // 遗产等于目前所有加奖金
you.bequeath = you.bequeath + buyHouse(you); // 异常等于买房后的所得,可能是负数,以下雷同
you.bequeath = you.bequeath + marriage(you, yourWomen); // 和你的女人结婚
you.bequeath = you.bequeath + procreate(yourWomen); // 生孩
you.bequeath = you.bequeath+ doSomeThing(yourFamily); // 等等
break;
}
else
{
isWinLottery= buyLottery(); // 买彩票
};
i++;
};
you.bequeath = you.bequeath + you.lifeOver(); // 除去葬礼的开销
yourafterworld.bequeath = yourafterworld.bequeath + you.bequeath; // 剩下就是你的后代的
you.bequeath = 0; // 你的所得被清零
beta1:忘记C/C++怎么写的了
beta2:还是没想起来C语法是不是这样写的,郁闷。
[此贴子已经被作者于2007-9-13 20:14:51编辑过]