首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <stdio.h>      
main()
{  
    int i,x,y;                 //定义一副牌,由于没有10这个字符,所以在定义时用字符0代表10
    char card[52][2]={{'3','A'},{'3','2'},{'3','3'},{'3','4'},{'3','5'},{'3','6'},{'3','7'},{'3','8'},{'3','9'},{'3','0'},{'3','J'},{'3','Q'},{'3','K'},
    {'4','A'},{'4','2'},{'4','3'},{'4','4'},{'4','5'},{'4','6'},{'4','7'},{'4','8'},{'4','9'},{'4','0'},{'4','J'},{'4','Q'},{'4','K'},
    {'5','A'},{'5','2'},{'5','3'},{'5','4'},{'5','5'},{'5','6'},{'5','7'},{'5','8'},{'5','9'},{'5','0'},{'5','J'},{'5','Q'},{'5','K'},
    {'6','A'},{'6','2'},{'6','3'},{'6','4'},{'6','5'},{'6','6'},{'6','7'},{'6','8'},{'6','9'},{'6','0'},{'6','J'},{'6','Q'},{'6','K'}},temp[2];     
     
    for(i=0;i<100;i++)      //洗牌
    {          
        x=rand()%52;
......................
阅读全部 | yanzifan 贴于 2011年12月8日 18:31     hide bbsi
#include<stdio.h>
int found(int);
void main()
{
    int number,m=2;
    printf("请输入一个大于4的偶数:");
    scanf("%d",&number);
    for(;m<number;m++)
        if(found(m)==1&&found(number-m)==1)//查找能拆分出来的两个素数
            break;
    printf("%d=%d+%d\n",number,m,number-m);
}
......................
阅读全部 | 汪苏哲 贴于 2011年12月8日 07:17     hide bbsi
#include <stdio.h>
#include <bios.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
#define CROSSRU     0xbf 
#define CROSSLU     0xda
#define CROSSLD     0xc0 
#define CROSSRD     0xd9
#define CROSSL      0xc3
#define CROSSR      0xb4
#define CROSSU      0xc2
......................
阅读全部 | 笑了丶 贴于 2011年12月8日 03:46     hide bbsi
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> New Document </title>
<meta http-equiv="content-type" content="text/html;charset=gbk">
</head>
<body>
<input type="button" onclick="fsdx();" value="获取短信验证码" id="hqdxyzm"/>

</body>
</html>
<script language="JavaScript" type="text/javascript">
......................
阅读全部 | wtuaimmmm 贴于 2011年12月7日 19:22     hide bbsi
如何对三张关联表做查询,查询后的结果放到datagridview中
阅读全部 | chen09403255 贴于 2011年12月6日 23:19     hide bbsi
// xujianfeng.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "assert.h"
#include "memory.h"
typedef struct word
{char cnword[18];
char enword[128];
......................
阅读全部 | dictionary 贴于 2011年12月5日 03:55     hide bbsi
// xujianfeng.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "assert.h"
#include "memory.h"
typedef struct word
{char cnword[18];
char enword[128];
......................
阅读全部 | dictionary 贴于 2011年12月5日 03:53     hide bbsi
#include<iostream.h>
int prime(int n)
{
    int j=2;
    while(n%j!=0)
        j++;
    if(j==n)
        return 1;
    else
        return 0;
}
void main()
......................
阅读全部 | 付冠英 贴于 2011年12月2日 19:51     hide bbsi
#include<stdio.h>
#include<string.h>
int main()
{
    char c[6][50];
    char *p,*r;
    int i;
    r=c[5];
    for(i=0; i<5; i++)
        gets(c[i]);
    for(i=0; i<4; i++)
    {
......................
阅读全部 | Bearox 贴于 2011年11月30日 06:39     hide bbsi
在MATLAB 命令中输入主函数
Syms t
f=t^4-t^2-2*t+5;
[x1,x2] = minJT(f,0,0.1)
进退法确定搜索区间函数文件minJT如下:
function [minx,maxx]= minJT(f,x0,h0,eps)
%目标函数: f ;
%初始点 : x0;
%初始步长: h0;
%精度 :esp;
%区间左端点 : minx;
%区间右端点: maxx;
......................
阅读全部 | 零度元素 贴于 2011年11月29日 17:55     hide bbsi
上一页 306 307 308 309 310 311 312 313 314 315 下一页