| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1121 人关注过本帖
标题:我写的代码改了好久 ,结果还有5处错误,能给我看看吗,门外汉的痛啊
取消只看楼主 加入收藏
liu609
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2015-4-18
结帖率:0
收藏
已结贴  问题点数:10 回复次数:1 
我写的代码改了好久 ,结果还有5处错误,能给我看看吗,门外汉的痛啊
#include<math.h>
#include<stdio.h>
main()
{
double s,h,p,p1,p0,a,v,w,p2;
w=215*3.14/30,h=30,p0=90,p1=90,p=0,p2=190;
for(p=0;p<=190;p=p+5)
{if(0<=p&&p<=45)
{s=2*h*p*p/p0*p0,v=4*h*w*p/p0*p0,a=4*h*w*w/p0*p0;}
else
{if(45<p&&p<=90)
s=(h-2*h*(p0-p)*(p0-p))/p0*p0,v=4*h*w*(p0-p)/p0*p0,a=-4*h*w*w/p0*p0;}
else
if(100<=p&&p<=145)
{s=(h-2*h*(p-100))/p0*p0,v=-4*h*w*(p-100)/p0*p0,a=-4*h*w*w/p0*p0;}
else
{if(145<p&&p<=190)
s=2*h*(p2-p)*(p2-p)/p0*p0,v=-4*h*w*(p2-p)/p0*p0,a=4*h*w*w/p0*p0;}}
printf("/n%d,/n%d,/n%d",a,v,s);}


就这样的--------------------配置: mingw5 - CUI Debug, 编译器类型: MinGW--------------------

检查文件依赖性...
正在编译 C:\Users\liu-\Documents\C-Free\Projects\1\main.cpp...
[Warning] D:\迅雷下载\C-Free 5\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\backward\backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
[Error] g++.exe: 5\mingw\include: No such file or directory
[Error] g++.exe: 5\mingw\include\c++\3.4.5: No such file or directory
[Error] g++.exe: 5\mingw\lib\gcc\mingw32\3.4.5\include: No such file or directory
[Error] g++.exe: 5\mingw\bin\: No such file or directory
[Error] g++.exe: 5\mingw\mingw32\bin\: No such file or directory

构建中止 main: 5 个错误, 1 个警告
搜索更多相关主题的帖子: include double 门外汉 
2015-04-19 19:44
liu609
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2015-4-18
收藏
得分:0 
回复 2楼 宇智波鼬123
谢谢  谢谢
2015-04-20 09:34
快速回复:我写的代码改了好久 ,结果还有5处错误,能给我看看吗,门外汉的痛啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011536 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved