首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
// varwid.c -- uses variable-width output field 
#include <stdio.h>
int main(void)
{
    unsigned width, precision;
    int number = 256;
    double weight = 242.5;

    printf("What field width?\n");
    scanf("%d", &width);
    printf("The number is :%*d:\n", width, number);
    printf("Now enter a width and a precision:\n");
......................
阅读全部 | ksddah 贴于 2013年1月22日 17:23     hide bbsi
<?php

class ObjectArray{
private $obj;

public function __construct($array)
{
$this->obj = $array;
return $this;
}

public function add($arr)
......................
阅读全部 | 静夜思 贴于 2013年1月18日 21:44     hide bbsi
#coding: utf-8

require "find"

Find.find(File.dirname(__FILE__)) do |f|
if [".js", ".py"].any?{|i| f.end_with? i} and not f.include? __FILE__
str = File.read(f)
strdup = str.dup
while str =~ /(\n[\s\t]*)    /
str.gsub!(/(\n[\s\t]*)    /, "\\1\t")
end
File.open(f, "w").write(str)
......................
阅读全部 | 静夜思 贴于 2013年1月18日 13:41     hide bbsi
// nongli.cpp : 定义 DLL 应用程序的导出函数。
//

#include "stdafx.h"
#include "nongli.h"
#include <string.h>
#include <stdio.h>
#include <string.h>

#define days1800  341
int nongli[]=
{
......................
阅读全部 | wp231957 贴于 2013年1月16日 16:40     hide bbsi
//=====================
//百钱买百鸡问题:
//条件,公鸡7元一只,母鸡5元一只,小鸡1元三只,
//问,100元买100只鸡,则,公鸡母鸡小鸡应各买多少只?
//=====================
#include<iostream>
using namespace std;
//---------------------
int main()
{
    for(int g=1;g<=13;++g)                    //定义公鸡为字母g,并且限定g的类型和范围
        for(int m=1;m<=15;++m)                //同上,定义母鸡为字母m
......................
阅读全部 | hu269839683 贴于 2013年1月16日 12:59     hide bbsi
<?php

class ObjectArray{
    private $obj;

    public function __construct($array)
    {
        $this->obj = $array;
        return $this;
    }

    public function count($item = null){
......................
阅读全部 | 静夜思 贴于 2013年1月15日 23:46     hide bbsi
<?php

class ObjectArray{
    private $obj;

    public function __construct($array)
    {
        $this->obj = $array;
        return $this;
    }

    public function count($item = null){
......................
阅读全部 | 静夜思 贴于 2013年1月15日 23:24     hide bbsi
<?php

class Arr{
    private $obj;

    public function __construct($array)
    {
        $this->obj = $array;
        return $this;
    }

    public function each($func)
......................
阅读全部 | 静夜思 贴于 2013年1月15日 16:47     hide bbsi
procedure  n_con_g(nyear:integer;nmonth:integer;nday:integer;niyear:pinteger;nimonth:pinteger;niday:pinteger)
                   stdcall;external 'd:\nongli.dll';
procedure  g_con_n(syear:integer;smonth:integer;sday:integer;niyear:pchar;nimonth:pchar;niday:pchar)
                   stdcall;external 'd:\nongli.dll';
procedure TForm1.Button4Click(Sender: TObject);
var
  syear: array[0..10]of char;
  smonth:array[0..10]of char;
  sday:  array[0..10]of char;
  iyear: integer;
  imonth:integer;
  iday:  integer;
......................
阅读全部 | wp231957 贴于 2013年1月15日 10:36     hide bbsi
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <string.h>
#include "StdAfx.h"
#define days1800  341
int nongli[]=
{
    /*************************************** 
    * 农历1800-2100年大月小月与闰月 * 
    * (连同111个闰月在内共3723个月) * 
    * 公元1800-01-01为腊月(大)初七 * 
......................
阅读全部 | wp231957 贴于 2013年1月13日 12:33     hide bbsi
上一页 265 266 267 268 269 270 271 272 273 274 下一页