上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 27 下一页
摘要: 文件打开关闭函数:fopen()和fclose() 字符读写函数 :fgetc()和fputc()字符串读写函数:fgets()和fputs()数据块读写函数:fread()和fwrite()格式化读写函数:fscanf()和fprinf()mode有下列几种形态字符串:r 打开只读文件,该文件必须存在。r+ 打开可读写的文件,该文件必须存在。w 打开只写文件,若文件存在则文件长度清为0,即该文件内容会消失。若文件不存在则建立该文件。w+ 打开可读写文件,若文件存在则文件长度清为零,即该文件内容会消失。若文件不存在则建立该文件。a 以附加的方式打开只写文件。若文件不存在,则会建立该文件,如果文 阅读全文
posted @ 2013-07-12 20:55 蓬莱仙羽 阅读(437) 评论(0) 推荐(0)
摘要: #include#define N4//冒泡排序int* bubbleSort(int*num,intNN) //前面参数是指向整形数组的指针,后面的N是这个数组的大小{ for(inti=0; inum[j+1]) { num[j]=num[j]^num[j+1]; //yi'huo num[j+1]=num[j]^num[j+1]; num[j]=num[j]^num[j+1]; } } } int*p=num;//返回数组 returnp;}//快速排序void* quickSort(int*num,intNN){ }//显示调... 阅读全文
posted @ 2013-07-10 18:51 蓬莱仙羽 阅读(190) 评论(0) 推荐(0)
摘要: 一元二次方程组求解 1 // 2 3 // main.c 4 5 // 一元二次方程求解 6 7 // 8 9 // Created by 丁小未 on 13-7-9. 10 11 // Copyright (c) 2013年 dingxiaowei. All rights reserved. 12 13 // 14 15 16 17 #include 18 19 #include 20 21 float O(float a,float b,float c) 22 23 { 24 25 float res = b*b-4*a*c... 阅读全文
posted @ 2013-07-10 18:46 蓬莱仙羽 阅读(376) 评论(0) 推荐(0)
摘要: 简易加减乘数计算器的实现 1 // 2 // main.c 3 // 指向函数的指针 4 // 5 // Created by 丁小未 on 13-7-10. 6 // Copyright (c) 2013年 dingxiaowei. All rights reserved. 7 // 8 9 #include 10 11 int sum(int a,int b)12 {13 int c = a + b;14 printf("%d + %d = %d",a,b,c);15 return c;16 }17 18 int minus(int a,int b)19 ... 阅读全文
posted @ 2013-07-10 18:44 蓬莱仙羽 阅读(495) 评论(0) 推荐(0)
摘要: #include#include#include#include#define MAX 2000struct Student{ int no; /*学号*/ char name[8]; /*姓名*/ char sex; /*性别*/ char phone[8];/*联系电话*/ int mark[4]; /*语文、数学、外语、考试平均成绩*/ };int total; /*总人数*/char password[20];/*密码*/struct Student student[MAX];/***************... 阅读全文
posted @ 2013-07-09 08:27 蓬莱仙羽 阅读(619) 评论(2) 推荐(0)
摘要: /*41. 车厢调度 (限1 人完成)问题描述:假设停在铁路调度站入口处的车厢序列的编号一次为1,2,3,4。设计一个程序,求出所有可能由此输出的长度为4的车厢序列。*/ #include #includeint n = 0; //交换两个数void swap(int *a, int *b) { int m; m = *a; *a = *b; *b = m; } //递归 void perm(FILE* fw,int list[], int k, int m) { int i; if(k > m) { for(i = 0; i <= m; i++) { fprint... 阅读全文
posted @ 2013-06-27 11:56 蓬莱仙羽 阅读(712) 评论(0) 推荐(0)
摘要: ASP.NET+Access一、登入部分主界面 Fm = new 主界面(); string s1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=student.mdb"; string s2 = "select*from 登录信息表 where 用户名='" + this.ttbName.Text + "' and 密码 ='" + ttbPwd.Text + "'and 身份='" + cbbId.Text + " 阅读全文
posted @ 2013-06-25 20:32 蓬莱仙羽 阅读(429) 评论(0) 推荐(0)
摘要: #include <stdio.h>int n = 0; //交换两个数void swap(int *a, int *b) { int m; m = *a; *a = *b; *b = m; } void perm(int list[], int k, int m) { int i; if(k > m) { for(i = 0; i <= m; i++) printf("%d ", list[i]);... 阅读全文
posted @ 2013-06-20 23:17 蓬莱仙羽 阅读(804) 评论(0) 推荐(0)
摘要: #include <reg51.h>typedef unsigned char uchar;typedef unsigned int uint;void delay(unsigned int i); //函数声名char DelayCNT;//定义变量sbit P10=P1^0;uint Count=0;uchar n=0;uchar Key_Value;//获取键盘码uint i=0;uint flag=0;//此表为 LED 的字模, 共阴数码管 0-funsigned char code Disp_Tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d, 阅读全文
posted @ 2013-06-20 15:49 蓬莱仙羽 阅读(406) 评论(0) 推荐(0)
摘要: /*********************************************************************************** 标题: 试验数码管上显示数字( 单片机直接实现位选 共阴极) ** ** 连接方法:P0与J12 用8PIN排线连接 P1与JP16 用排线连接 ****... 阅读全文
posted @ 2013-06-19 23:13 蓬莱仙羽 阅读(677) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 27 下一页