[C.C++] c语言c2447错误,error c2447_C语言问题 error C2086 error C2447

51 0
Honkers 前天 14:35 来自手机 | 显示全部楼层 |阅读模式

最佳答案

原程序有些错误,如子函数定义和调用等。在原程序基础上,作了修改,下面是编译通过的程序:

#include

#defineall_this_years_old71

inten();

inted();

intmain()

{

intresult_dad;

intresult_mom;

result_dad=ed();

result_mom=en();

printf("MomandDadthisyearand71yearsofage,aftermorethan10years,myfatherisolderthanhermother,askedhowmanyyearsoldthisyear,howmanyyearsoldmother?\n");

printf("dad=%d,mom=%d\n",result_dad,result_mom);

return0;

}

inted()

{

intresult_dad=(all_this_years_old+5)/2;

returnresult_dad;

}

inten()

{

intresult_mom=(all_this_years_old-5)/2;

returnresult_mom;

}

程序的运行结果如下:

t019dc5bef26e46f75c.jpg

最佳答案由网友  ygl990951  提供

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行