当前位置: 代码迷 >> C语言 >> 我们多少年买的起房
  详细解决方案

我们多少年买的起房

热度:197   发布时间:2007-09-13 12:41:02.0
我们多少年买的起房
有个问题是
假如2015年房价80万,今年我大学毕业第一年月工资是2000元,我的年工资增长率应该至少是多少,到2015年才能买的起房.
用循坏做呀
我想可以这样吗?
for(i=0;i<=7;i++)
{年工资=年工资*(1+年增长率(求的))
if(年工资<=80万)
{break;}
}
不行该怎么算呀
搜索更多相关的解决方案: 工资  房价  大学  break  增长率  

----------------解决方案--------------------------------------------------------
楼上又在重复发帖子,发了C++又发C



by 雨中飞燕 QQ:78803110 QQ讨论群:5305909

[url=http://bbs.bc-cn.net/viewthread.php?tid=163571]请大家不要用TC来学习C语言,点击此处查看原因[/url]
[url=http://bbs.bc-cn.net/viewthread.php?tid=162918]C++编写的Windows界面游戏[/url]
[url=http://yzfy.org/]C/C++算法习题(OnlineJudge):[/url] http://yzfy.org/
----------------解决方案--------------------------------------------------------

LZ最近在做人生规划~~~


----------------解决方案--------------------------------------------------------
指点一下怎么写
----------------解决方案--------------------------------------------------------

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编辑过]


----------------解决方案--------------------------------------------------------
difficult mark

----------------解决方案--------------------------------------------------------
你能说一下你的变量,不然不能理解
----------------解决方案--------------------------------------------------------
还有!blGetLottery这是什么呀,你
对2个人
----------------解决方案--------------------------------------------------------
以下是引用anthony634在2007-9-13 13:12:50的发言:


//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语法是不是这样写的,郁闷。

beta3: 修改了部分命名,增加客户需求的说明。2007.09.13 修改

[此贴子已经被作者于2007-9-13 20:14:51编辑过]


----------------解决方案--------------------------------------------------------
哈哈牛人
----------------解决方案--------------------------------------------------------
  相关解决方案