2019-11-17 22:43:19
#include <stdio.h>#include <process.h>void main(){ FILE *fp; char filename[30],str[30]; printf("please input filename:\n"); scanf("%s",filename); if((fp=fopen(filename,"r"))==NULL){ printf("can not open
2019-11-17 22:42:11
#include <stdio.h>#include <process.h>void main(){ FILE *fp; char filename[30],str[30]; printf("please input filename:\n"); scanf("%s",filename); if((fp=fopen(filename,"w"))==NULL){ printf("can not open
2019-11-17 21:26:37
#include <stdio.h>void main(){ FILE *fp; char ch; fp=fopen("E:\\exp01.txt","r"); ch=fgetc(fp); while(ch!=EOF){ putchar(ch); ch=fgetc(fp); } printf("\n"); fclose(fp);}
2019-11-17 20:46:12
#include <stdio.h>#include <stdlib.h>void main(){FILE *fp;char ch;if((fp=fopen("E:\\exp01.txt","w"))==NULL){ printf("cannot open file\n"); exit(0);}ch=getchar();while(ch!='#'){ putc(ch,fp);&nbs
2019-11-17 18:55:54
#line 100 "13.7.c"#include <stdio.h>void main(){ printf("1.当前行号:%d\n",__LINE__); printf("2.当前行号:%d\n",__LINE__);}
2019-11-17 14:48:11
#include <stdio.h>#define STR "Believe yourself\n"int main(){#ifdef STR printf(STR);#else printf("**Don't give up**\n");#endif printf("\n");#ifndef ABC printf("Dont't give up\n");#else
2019-11-17 14:35:45
#include <stdio.h>#define TEM 37int main(){#if TEM>37 printf("高烧\n");#elif TEM<36 printf("低烧\n");#else printf("正常体温\n");#endif printf("当前温度是:%d\n",TEM); return 0;}
2019-11-17 14:28:56
#include <stdio.h>#define iInput 19054int main(){ printf("当前是:%d\n",iInput);#if iInput >0 if(iInput % 9527 == 0&&iInput%2 == 0) printf("能被9527整除的偶数\n");#else#if iInput<0 printf("当前为负数:%d\n",iInput);#
2019-11-17 14:15:33
#include "stdio.h"#define NUM 51void main(){ int i=0;#if NUM>50 i++;#endif#if NUM==50 i=i+50;#endif #if NUM<50 i--;#endif printf("NOW i is %d\n",i);}
2019-11-17 14:02:45
#include "stdio.h"#include "age.h"int main(){ int age=3; age=A; p("年龄是"D"岁\n",age); return 0;}