旺仔牛奶--
发表于 2016-10-17 21:33:19
想看
Caleb
发表于 2016-10-18 21:31:21
好好学习,天天向上!{:5_91:}
qq1442525629
发表于 2016-10-18 22:07:50
复制到vs2013中显示有错误
a11012580
发表于 2016-10-18 22:55:06
打了半天好像输错了,显示0行{:10_250:}
a11012580
发表于 2016-10-18 22:58:45
怎么复制代码编译运行后显示27行代码?
野望wzt
发表于 2016-10-19 13:14:33
支持!!
黑名单1
发表于 2016-10-19 16:43:58
感谢分享,楼主辛苦了
拳皇
发表于 2016-10-19 20:18:38
查看参考答案
thgking007
发表于 2016-10-19 21:36:24
这答案期待啊
fisccc
发表于 2016-10-20 20:18:52
本帖最后由 fisccc 于 2016-10-20 20:27 编辑
247726404
发表于 2016-10-20 21:54:18
666
ZN460
发表于 2016-10-21 14:36:28
看测试题答案
mzhh1985
发表于 2016-10-21 14:51:13
总共99行代码。
修改了20分钟
写错了8个大小写字母;
丢了1个大括号;
拼错了1个单词;
遇到4个erro,
3个waring
最后终于没有错误的编译执行了
我爱木子-
发表于 2016-10-22 00:14:18
{:5_96:}Users\Administrator\Desktop
步步高升Eagle
发表于 2016-10-22 02:57:17
谢谢小甲鱼教导!
qilin0918
发表于 2016-10-22 14:18:44
include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
#include<io.h>
#include<direct.h>
#include<stdio.h>
#include<stdio.h>
#include<string.h>
#define MAX 256
long total;
int countlines(const char *filename);
void findALLCodes(const char *path);
void findALLfiles(const char *path);
int countlines(const char *filename)
{
FILE *fp;
int count =0;
int temp;
if ((fp=fopen(filename,"r"))==NULL)
{
fprintf(stderr,"Can not open the file:%s\n", filename);
return 0;
}
while((temp=fgetc(fp)) !=EOF)
{
if(temp == '\n')
{
count++;
}
}
fclose(fp);
return count
}
void findALLCodes(const char *path)
{
structfinddata t fa:
long handle;
char thePathe,target;
strcpy(thePath,path);
if((handle = _findfirst(strcat(thepath,"/*.c") &fa)) != -1L)
{
do
{
sprintf(target, "%s/s%s",path,fa.name);
tatal +=countlines(target);
}whlie(_findnext(handle,&fa) ==o);
}
_findclose(handle);
}
void findALLDirs(const char *path)
{
struct _finddata_t fa;
long handle;
char thePathe;
strcpy(thePaht,paht);
if((handle =_findfirst(strcat,"/*),&fa)) ==-1L)
{
do
{
sprintf(target,"%s/%s",pathe,fa.mane);
total += countlines(target);
}while (findnext(handle,%fa) == o);
}
_findclose(handle);
}
void findALLDirs(const char *path)
{
struct _finddata_t fa;
long handle;
char thePaht;
strcpy(thePaht,path);
if((handle =_findfirst(strcat(thepath,"/*"),%fa)) ==-1L)
{
fprintf(stderr,"The path %s is wrong!\n",path);
return;
}
do
}
if(!strcmp(fa.name,".") || !strcmp(fa.name,".."))
continue;
if(fa.attrib == _A_SUBDIR)
{
sprint(thePath,"%s/%s, path,fa.name);
findALLCodes(thePath);
findALLDirs(thePath);
}
}whlie (_findnext(handle,%fa) ==0);
_findclose(handle);
}
int main()
}
char path = "."
printf("计算中...\n");
findAllCodes(path);
findALLDirs(path);
printf("目前你总共写了 %1d 行代码! \n\n",total);
system("pause");
return o;
昭阳12138
发表于 2016-10-23 11:57:52
看看 。。。。。
癫材
发表于 2016-10-23 12:00:38
0.只认识01
1.机器语言
2.编译
3.不知道
4.不知道
5.由解释器翻译成机器可认识的代码
6.不知道
7.不知道
cbs丶咏声
发表于 2016-10-23 20:45:50
1
zjx5063
发表于 2016-10-25 21:34:49
真想知道