| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 769 人关注过本帖
标题:程序运行问题? 求助!
取消只看楼主 加入收藏
kevin320
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-2-22
收藏
 问题点数:0 回复次数:2 
程序运行问题? 求助!
#include<stdio.h>
void main()
{
int cookies=5;
int cookie_calories=125;
int total_eaten=0;

int eaten=2;
cookies=cookies-eaten;
total_eaten=total_eaten+eaten;
printf("\ni have eaten %d cookies.there are %d cookies left",eaten,cookies);
eaten=3;
cookies=cookies-eaten;
total_eaten=total_eaten+eaten;
printf("ni have eaten %d more.now there are %d cookies left\n",eaten,cookies);
printf("\ntotal energy consumed is %d calories.\n",total_eaten*cookie_calories);
}

请问这么程序运行起来会很慢吗?
我用的是visual c++ 6.0 应该没有问题吧 我都等5分钟了

怎么回事啊
搜索更多相关主题的帖子: 运行 
2008-03-20 17:09
kevin320
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-2-22
收藏
得分:0 
怎么没有人回答我啊 。
都等了一个小时了,是不是软件有什么 问题  哪位能告诉可能会出现的问题!
2008-03-20 18:24
kevin320
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-2-22
收藏
得分:0 
#include<stdio.h>
void main()
{
int cookies=5;
int cookie_calories=125;
int total_eaten=0;

int eaten=2;
cookies=cookies-eaten;
total_eaten=total_eaten+eaten;
printf("\ni have eaten %d cookies.there are %d cookies left",eaten,cookies);
eaten=3;
cookies=cookies-eaten;
total_eaten=total_eaten+eaten;
printf("ni have eaten %d more.now there are %d cookies left\n",eaten,cookies);
printf("\ntotal energy consumed is %d calories.\n",total_eaten*cookie_calories);
}
2008-03-20 18:37
快速回复:程序运行问题? 求助!
数据加载中...
 
   



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

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