这个程序输出不对求大神f1官方驱动程序

为了账号安全,请及时绑定邮箱和手机
求大神帮我搞明白这个输出1000遍我爱慕课网的程序里的i++是什么作用?
int i=1;do{
System.out.println("我爱慕课网!");
while ( i&=1000);我知道i++是先给i取值然后再加1的意思,可是到了这个程序里面我就是不明白它是什么执行的了。当输出第1000遍“我爱慕课网”的时候这个时候的 i 是几呢?
写下你的评论...
写下你的评论...
写下你的评论...
写下你的评论...
Copyright (C)
All Rights Reserved | 京ICP备 号-2小木虫 --- 500万硕博科研人员喜爱的学术科研平台
&&查看话题
很简单的Fortran赋值出错啦,求大神们帮忙找bug...
就是以下这么简单的循环赋值语句,在NX=NY=21和NX=NY=31时结果完全没问题,当把NX和NY提高到41及以上时,以下这些循环语句中输出的XM也都没有问题,但是YM却都不对,比如第三行的YM(I)明明已经都赋予0.0了,但是输出的却不是零,第十一行把HY赋予YM时,输出也都不是HY。。。不知道是什么问题,求大神指教。。。mua mua。。。
& && &DO I=1,NX& & & &
& & & & XM(I)=HX*(I-1.0)/(NX-1.0)
& & & & YM(I)=0.0
& && &ENDDO
& && &DO I=1,NY-1& & & &
& & & & XM(NX+I)=HX
& & & & YM(NX+I)=HY*I/(NY-1.0)
& && &ENDDO
& && &DO I=1,NX-1& & & &
& & & & XM(NX+NY-1+I)=HX-HX*I/(NX-1.0)
& & & & YM(NX+NY-1+I)=HY
& && &ENDDO
& && &DO I=1,NY-2& & & &
& & & & XM(2*NX+NY-2+I)=0.0
& & & & YM(2*NX+NY-2+I)=HY-HY*I/(NY-1.0)
& && &ENDDO
& && &DO I=1,NY-2
& && &DO J=1,NX-2
& & & & IJ=2*(NX+NY)-4+(NX-2)*(I-1)+J
& & & & XM(IJ)=J/(NX-1.0)*HX
& & & & YM(IJ)=I/(NY-1.0)*HY
& && &ENDDO
& && &ENDDO
找到错因了,数组越界了,定义的XM(NOTN),YM(NOTN),NOTN只给了就不行了。。。太粗心了。。。掩面而逃啊。。。感谢啊。。。
找到错因了,数组越界了,定义的XM(NOTN),YM(NOTN),NOTN只给了就不行了。。。太粗心了。。。掩面而逃啊。。。
找到错因了,数组越界了,定义的XM(NOTN),YM(NOTN),NOTN只给了就不行了。。。太粗心了。。。掩面而逃啊。。。
找到错因了,数组越界了,定义的XM(NOTN),YM(NOTN),NOTN只给了就不行了。。。太粗心了。。。掩面而逃啊。。。
找到错因了,数组越界了,定义的XM(NOTN),YM(NOTN),NOTN只给了就不行了。。。太粗心了。。。掩面而逃啊。。。
研究生必备与500万研究生在线互动!
扫描下载送金币eclipse运行Java程序出错,求大神帮忙解决。 - 开源中国社区
当前访客身份:游客 [
当前位置:
不知道应该怎么解决。
11:57:07.062 [main] ERROR [FrameworkServlet.java] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schoolControll': Injection of resource nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.yingxinhuitong.weixin.service.api.SchoolService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, lookup=, authenticationType=CONTAINER)}
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:311) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:666) ~[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:632) ~[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:680) ~[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:551) ~[spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:492) [spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:242) [servlet-api-3.0.jar:?]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492) [jetty-servlet-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:312) [jetty-servlet-8.1.2.v.jar:8.1.2.v]
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:777) [jetty-servlet-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258) [jetty-servlet-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221) [jetty-webapp-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699) [jetty-server-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454) [jetty-webapp-8.1.2.v.jar:8.1.2.v]
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90) [jetty-server-8.1.2.v.jar:8.1.2.v]
at org.eclipse.jetty.server.Server.doStart(Server.java:263) [jetty-server-8.1.2.v.jar:8.1.2.v]
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-util-8.1.2.v.jar:8.1.2.v]
at runjettyrun.Bootstrap.main(Bootstrap.java:80) [run-jetty-run-bootstrap-jetty8.jar:?]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.yingxinhuitong.weixin.service.api.SchoolService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, lookup=, authenticationType=CONTAINER)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.monAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:508) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.monAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:486) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.monAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:615) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
... 30 more
11:57:07.071:WARN:/:unavailable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schoolControll': Injection of resource nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.yingxinhuitong.weixin.service.api.SchoolService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, lookup=, authenticationType=CONTAINER)}
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:311)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:666)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:632)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:680)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:551)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:492)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:312)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:777)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at runjettyrun.Bootstrap.main(Bootstrap.java:80)
Caused by:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.yingxinhuitong.weixin.service.api.SchoolService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, lookup=, authenticationType=CONTAINER)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.monAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:508)
at org.springframework.monAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:486)
at org.springframework.monAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:615)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.monAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:666)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:632)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:680)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:551)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:492)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:312)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:777)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:258)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:699)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at org.eclipse.ponent.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at runjettyrun.Bootstrap.main(Bootstrap.java:80)
共有6个答案
<span class="a_vote_num" id="a_vote_num_
Error creating bean with name'schoolControll': Injection of resource nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.yingxinhuitong.weixin.service.api.SchoolService] foundfordependency: expected at least1bean which qualifies as autowire candidateforthisdependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=classjava.lang.Object, lookup=, authenticationType=CONTAINER)}
这么明显还没看出来?
--- 共有 1 条评论 ---
不知道怎么解决。我是新手
(1周前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
com.yingxinhuitong.weixin.service.api.SchoolService 这个控制器的bean配置呢
<span class="a_vote_num" id="a_vote_num_
SchoolService 类上有加
--- 共有 1 条评论 ---
加了还是报一样的错误
(1周前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
服务类需要加上 ,Dao需要@Repository,如果都没错,项目clean一下
--- 共有 2 条评论 ---
: 相关的几个文件贴个图呢
(1周前)&nbsp&
我试过,还是报一样的错误
(1周前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
就是bean没有map上,配置文件里或者用注解把这个bean关联进spring,不然spring可不知道你写的啥;具体没看你的项目代码,不知具体告诉你怎么配置了。
--- 共有 1 条评论 ---
谢谢,已经解决了。
(6天前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
spring容器创建schoolControll 这个bean的时候,需要一个依赖&com.yingxinhuitong.weixin.service.api.SchoolService,但是没有找到,所以就报错啦
--- 共有 1 条评论 ---
谢谢,已经解决了
(6天前)&nbsp&
更多开发者职位上
有什么技术问题吗?
染了个发的其它问题
类似的话题,在里面的优化选项里选择类似“关闭windows错误报告功能”选项即可。这样,问题就解决啦^_^
您的举报已经提交成功,我们将尽快处理,谢谢!
建议你去下载一个windows 7优化大师,在里面的优化选项里选择类似“关闭windows错误报告功能”选项即可。这样,问题就解决啦^_^
大家还关注
(window.slotbydup=window.slotbydup || []).push({
id: '2081942',
container: s,
size: '1000,60',
display: 'inlay-fix'共有 679 人关注过本帖
标题:程序编的没有错误提示 ,但运行没结果求大神改改
等 级:论坛游民
帖 子:40
专家分:23
结帖率:75%
&&已结贴√
&&问题点数:10&&回复次数:8&&&
程序编的没有错误提示 ,但运行没结果求大神改改
# include&stdio.h&
int main()
int a,b,c,d;
printf(&请输入4个数:&);
scanf(&%d,%d,%d,%d&,&a,&b,&c,&d);
if(a&c&&c&b&&b&d)
printf(&%d%d%d%d&,a,c,b,d,a&c&b&d);
if(c&a&&a&b&&b&d)
printf(&%d%d%d%d&,c,a,b,d,c&a&b&d);
if(c&b&&b&a&&a&d)
printf(&%d%d%d%d&,c,b,a,d,c&b&a&d);
if(c&b&&b&d&&d&a)
printf(&%d%d%d%d&,c,b,d,a,c&b&d&a);
if(a&b&&b&c&&c&d)
printf(&%d%d%d%d&,a,b,c,d,a&b&c&d);
if(a&b&&b&d&&d&c)
printf(&%d%d%d%d&,a,b,d,c,a&b&d&c);
if(a&c&&c&d&&d&b)
printf(&%d%d%d%d&,a,c,d,b,a&c&d&b);
搜索更多相关主题的帖子:
等 级:版主
威 望:65
帖 子:2121
专家分:6924
随便输入 4,3,2,1 有结果的
等 级:论坛游民
帖 子:40
专家分:23
但输入其他数值不行啊如:1,2,3,4
等 级:论坛游民
帖 子:40
专家分:23
但输入其他数值不行啊如:1,2,3,4
等 级:论坛游民
专家分:19
我试了一下,当你输入2,3,6,1时结果会正常显示,但是如果输入2 3 6 1或者2361都不会是正常结果
等 级:论坛游民
专家分:19
另外你的程序是没错,但是,对于4个数字的比较结果还不完整,例如你没有考虑d为最大值的情况,所以当你输入1,2,3,4后也自然没有结果
等 级:版主
威 望:65
帖 子:2121
专家分:6924
以下是引用亲琪琪在 22:57:28的发言:
但输入其他数值不行啊如:1,2,3,4
加多一句就有啊:
if (a&b && b&c && c&d)
&&& printf(&%d%d%d%d&,a,c,d,b);
等 级:版主
帖 子:353
专家分:1518
语法没错,就是考虑的不全面,毕竟你输入的4个数字只有符合你设定的if条件才会有输出。你的这段代码最好用if……else来写比较好。
有错自己多检查,往往错误发生在细节和不理解的地方
等 级:版主
帖 子:547
专家分:1704
你这相当于用排列组合的方式分别列举了4个数字大小的情况,但4数大小关系没有考虑全,适合用循环做,这样比较简洁
版权所有,并保留所有权利。
Powered by , Processed in 0.032124 second(s), 8 queries.
Copyright&, BCCN.NET, All Rights Reserved}

我要回帖

更多关于 ps输出颜色不对 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信