摘要: 需更新新的内容 阅读全文
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 博客_在线 阅读(506) 评论(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 博客_在线 阅读(895) 评论(0) 推荐(0)
摘要: 题目:建立一个文本文件,从键盘录入一篇短文存放在该文件中短文由若干行构成,每行不超过80个字符,并统计行数。 /* #include<iostream.h>#include<stdlib.h>#include<fstream.h>void main(){ fstream iofs; char *p, 阅读全文
posted @ 2019-11-10 16:19 博客_在线 阅读(275) 评论(0) 推荐(0)
摘要: 摘自书本内容: 补码: 12 原码和反码都不便于计算机内的运算,因为在运算中要单独处理其符号。例如,对以原码表示的+7和-7相加,必须先判断各自的符号位,然后对7位进行相应的处理,很不方便。 11 1 因此,最好能做到将符号位和其它位统一处理。对减法也按加法来处理。这就是“补码”。 10 2 补码的 阅读全文
posted @ 2019-11-08 16:52 博客_在线 阅读(991) 评论(0) 推荐(0)