| 查看: 646 | 回复: 6 | |||
| 当前主题已经存档。 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
[交流]
【求助】好心人帮我看看这个c++! 谢谢了
|
|||
|
这个程序在vc++ 6.0 怎么运行不了啊 ? 求助!问题在哪里这么改啊 ?谢谢了 #include #include struct polar { double distance; double angle; }; struct rect { double x; double y; }; polar rect_to_polar(rect xypos); void show_polar(polar dapos); int main() { rect rplace; polar pplace; cout<<"Enter the x and y values:"; while(cin>>rplace.x>>rplace.y) { pplace=rect_to_polar(rplace); show_polar(pplace); cout<<"Next two numbers(q to quit):"; } cout<<"Done.\n"; return 0; } polar rect_to_polar(rent xypos) { polar answer; answer.distance=sqrt(xypos.x*xypos.x+xypos.y*xypos.y); answer.angle=atan2(xypos.y,xypos.x); return answer; } void show_polar(pelar dapos) { const double Rad_to_deg=57.29577951; cout<<"distance="<< dapos.distance; cout<<", angle="< } [ Last edited by nono2009 on 2009-9-30 at 00:00 ] |
» 猜你喜欢
三甲基碘化亚砜的氧化反应
已经有4人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
请问有评职称,把科研教学业绩算分排序的高校吗
已经有5人回复
孩子确诊有中度注意力缺陷
已经有12人回复
2025冷门绝学什么时候出结果
已经有3人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
AI论文写作工具:是科研加速器还是学术作弊器?
已经有3人回复
论文投稿,期刊推荐
已经有4人回复
硕士和导师闹得不愉快
已经有13人回复
4楼2009-09-23 16:51:37
yeyunxiao
铁杆木虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 6096.1
- 帖子: 106
- 在线: 12.4小时
- 虫号: 588929
- 注册: 2008-08-29
- 性别: GG
- 专业: 计算机软件
★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
wangen994(金币+3,VIP+0):辛苦了,谢谢你对程序软件版的支持 9-23 12:13
小木虫(金币+0.5):给个红包,谢谢回帖交流
wangen994(金币+3,VIP+0):辛苦了,谢谢你对程序软件版的支持 9-23 12:13
|
#include #include struct polar { double distance; double angle; }; struct rect { double x; double y; }; polar rect_to_polar(rect xypos); void show_polar(polar dapos); int main() { rect rplace; polar pplace; cout<<"Enter the x and y values:"; while(cin>>rplace.x>>rplace.y) { pplace=rect_to_polar(rplace); show_polar(pplace); cout<<"Next two numbers(q to quit):"; } cout<<"Done.\n"; return 0; } polar rect_to_polar(rect xypos) { polar answer; answer.distance=sqrt(xypos.x*xypos.x+xypos.y*xypos.y); answer.angle=atan2(xypos.y,xypos.x); return answer; } void show_polar(polar dapos) { const double Rad_to_deg=57.29577951; cout<<"distance="<< dapos.distance; cout<<", angle="< } 嘿嘿,是编译错误吧, 是你的笔误啊,帮你用红色标出来了 编程的时候一定要细心哦! |
2楼2009-09-23 10:36:16
3楼2009-09-23 16:45:22
5楼2009-09-23 16:53:38














回复此楼