#include <stdio.h>
#include <stdlib.h>
#define MAX(x,y) (((x) >= (y)) ? (x) : (y))
#define MIN(x,y) (((x) <= (y)) ? (x) : (y))
int main(void)
{
int num1 = 1;
int num2 = 2;
int num3 = 3;
......................
阅读全部
|
八画小子
贴于 2016年9月25日 21:33
hide
bbsi
#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