摘要: 需更新新的内容 阅读全文
posted @ 2019-12-07 11:20 博客_在线 阅读(127) 评论(1) 推荐(0)
摘要: #include<iostream.h> struct date{ int year; int month; int day; }DT; void date(int year,int month,int day,int &total) { int i,k; for(i=1;i<month;i++) 阅读全文
posted @ 2019-12-07 11:20 博客_在线 阅读(171) 评论(1) 推荐(0)
摘要: public static boolean qf(File f,boolean a){ boolean b=false; if(a==true){ File[] fl=f.listfile(); for(File ffl:fl){ if(ffl.isDirect){ b=ffl.getTotalsp 阅读全文
posted @ 2019-12-07 11:17 博客_在线 阅读(297) 评论(0) 推荐(0)
摘要: //递归函数的定义:一个直接调用自己或通过一系列的调用语句间接第调用自己的函数,称做递归函数。在程序设计语言中实现递归,是栈的一个重要应用。 //1.改变变量求结果;2.改变变量同时做对函数进行+,-,*,/求结果 /* x=1 9x/2-1=1 x=4 8x/2-1=4 x=10 7x/2-1=1 阅读全文
posted @ 2019-11-11 15:47 博客_在线 阅读(161) 评论(0) 推荐(0)
摘要: #include<iostream.h> #include<stdlib.h> #include<string.h> #include<fstream.h> struct staff{ long staNum; char staName[500]; long phoNum; long num; ch 阅读全文
posted @ 2019-11-11 10:17 博客_在线 阅读(505) 评论(0) 推荐(0)
摘要: p=getchar(); } printf("\n"); rewind(in); //文件流指针移到文件开始位置 p=fgetc(in); while(!feof(in)){ //p!=EOF不适合缓冲文件系统处理二进制文件的情况;错误:p!='\0' p!='\n' putchar(p); p=f 阅读全文
posted @ 2019-11-10 16:33 博客_在线 阅读(392) 评论(0) 推荐(0)
摘要: 修改 阅读全文
posted @ 2019-11-10 16:30 博客_在线 阅读(196) 评论(0) 推荐(0)
摘要: 数据输入输出对象之间的关系图: 函数使用说明: 1.一个字符的输入\输出,对象是键盘(缓存和屏幕) 1.1.getchar(a),putchar(a); 1.2.scanf(“%d”,&i),printf(“%d”,i) 2. 一个变量的输入\输出,对象是键盘(缓存和屏幕) 2.1. gets(a) 阅读全文
posted @ 2019-11-10 16:30 博客_在线 阅读(890) 评论(0) 推荐(0)
摘要: 题目:建立一个文本文件,从键盘录入一篇短文存放在该文件中短文由若干行构成,每行不超过80个字符,并统计行数。 /* #include<iostream.h>#include<stdlib.h>#include<fstream.h>void main(){ fstream iofs; char *p, 阅读全文
posted @ 2019-11-10 16:19 博客_在线 阅读(274) 评论(0) 推荐(0)
摘要: 标准输入输出流与文件输入输出流的关系图: 文件输出流头文件“ofstream/fstream”,文件输入流头文件“ifstream/fstream” 1.1.打开文件方式:流类 对象名(文件名,方式); //文件路径填写方式"D\\新建文件夹\\X目录\\Y.bat"; 1.2.打开文件用 对象名. 阅读全文
posted @ 2019-11-08 16:52 博客_在线 阅读(696) 评论(0) 推荐(0)