| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3427 人关注过本帖
标题:加了#include<stdlib.h> #include <process.h>,system(pause);还是会报错, ...
取消只看楼主 加入收藏
zpg_sunny
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2014-9-12
结帖率:100%
收藏
已结贴  问题点数:11 回复次数:2 
加了#include<stdlib.h> #include <process.h>,system(pause);还是会报错,求指导
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include <process.h>
//#include <iostream>
int main()
{
    long a[10000];
    long i,j=0;
    for(i=0;i<10000;i++)
        a[i]=0;

for(i=1;i<10000;i++)

    {
    if(i<=9)
      a[i+i]=1;
if(i>9&&i<=99)
a[i+i/10+i%10]=1;
if(i>99&&i<=999)
a[i+i/100+i%100/10+i/100%10]=1;   
/*if(i>99&&i<=999)
a[i+i/100+i/10+i%10]=1; */   
if(i>999&&i<=9999)
a[i+i/1000+i%1000/100+i%1000%100/10+i%10]=1;
 
}
//输出自我数,每十个暂停
for(i=1;i<10000;i++)
{
  if(a[i]==0)
  {
    printf("%ld\n",i);
    j++;
  }
  if(j==10)
  {
    printf("按enter键继续输出\n");
/*    getchar();*/
    system(pause);
    j=0;
  }
  
}
return 0;

}


--------------------Configuration: ziwoshu - Win32 Debug--------------------
Compiling...
ziwoshu.c
F:\C-test\ziwoshu\ziwoshu.c(41) : error C2065: 'pause' : undeclared identifier
F:\C-test\ziwoshu\ziwoshu.c(41) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int '
F:\C-test\ziwoshu\ziwoshu.c(41) : warning C4024: 'system' : different types for formal and actual parameter 1
Error executing cl.exe.

ziwoshu.obj - 1 error(s), 2 warning(s)
搜索更多相关主题的帖子: include system 
2014-09-16 21:55
zpg_sunny
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2014-9-12
收藏
得分:0 
回复 2 楼 uestclicheng
thanks. 刚学,见笑了
2014-09-18 11:45
zpg_sunny
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2014-9-12
收藏
得分:0 
回复 4 楼 vvvcuu
学习了.thanks
2014-09-18 11:48
快速回复:加了#include<stdlib.h> #include <process.h>,system(pause);还是会 ...
数据加载中...
 
   



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

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