#include<stdio.h>
#include<string.h>
#include<windows.h>
typedef struct Man{
char Name[12];
char Sex[4];
char Old[4];
char Mobil[12];
char Tel[12];
char Address[16];
char QQ[12];
......................
阅读全部
|
和过去说拜拜
贴于 2016年9月24日 20:20
hide
bbsi
int a[10]={9,8,7,6,5,4,3,2,1,0};
int i,j,k,temp;
for (i=0;i<10;i++)
{
k=i;
for (j=i+1;j<10;j++)
{
if (a[i]>a[j])
k=j;
if (k!=i)
{
temp=a[i];
......................
阅读全部
|
龚肖飞
贴于 2016年9月10日 14:20
hide
bbsi
#include<stdio.h>
#define MAXSIZE 100
typedef int datatype;
typedef struct{
datatype a[MAXSIZE];
int top;
}sequence_stack;
void init(sequence_stack *st)
{
st->top=0;
}
void push(sequence_stack *st,datatype x)
......................
阅读全部
|
lqx22
贴于 2016年9月9日 21:14
hide
bbsi
#include<stdio.h>
#define MAXSIZE 100
typedef int datatype;
typedef struct{
datatype a[MAXSIZE];
int top;
}sequence_stack;
void init(sequence_stack *st)
{
st->top=0;
}
void push(sequence_stack *st,datatype x)
......................
阅读全部
|
lqx22
贴于 2016年9月9日 21:04
hide
bbsi
写一个定时关机的小程序,可以立即关闭计算机,也可以一段时间后关闭计算机。
这里主要考察system()命令。
代码实现:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char cmd[20]="shutdown -s -t ";
char t[5]="0";
......................
阅读全部
|
C语言大神
贴于 2016年9月6日 21:04
hide
bbsi
int a[10]={9,8,7,6,5,4,3,2,1,0};
int i,j,k,temp;
for (i=0;i<10;i++)
{
k=i;
for (j=i+1;j<10;j++)
{
if (a[i]>a[j])
k=j;
if (k!=i)
{
temp=a[i];
......................
阅读全部
|
胡文涛
贴于 2016年9月6日 19:03
hide
bbsi
#include<stdio.h>
#include<graphics.h>
#include <bios.h>
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define DOWN 0x5000
#define UP 0x4800
#define ESC 0x011b
#define space 0x3920
#define enter 0x1c0d
......................
阅读全部
|
等待微风
贴于 2016年9月6日 18:29
hide
bbsi
nclude<stdio.h>
int main()
{
int max(int x, int y);
int a, b, c;
scanf("%d, %d, &a, &b");
c = max(a, b);
......................
阅读全部
|
G1757210013
贴于 2016年9月5日 22:39
hide
bbsi
'Data为字符型数组 start为开始点 size 为几个,返回的即为 CRC
Public Function CRC16(Data() As Byte, start As Integer, size As Integer) As Long
Dim CRC16Lo As Byte, CRC16Hi As Byte 'CRC寄存器
Dim CL As Byte, CH As Byte '多项式码&HA001
Dim SaveHi As Byte, SaveLo As Byte
Dim i As Integer
Dim Flag As Integer
CRC16Lo = &HFF
CRC16Hi = &HFF
CL = &H1
CH = &HA0
For i = 0 To size - 1
......................
阅读全部
|
yangfw54
贴于 2016年8月31日 10:20
hide
bbsi