亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? standard.shar

?? c語言開發方面的經典問題,包括源代碼.c語言開發所要注意的問題,以及在嵌入式等各方面的應用
?? SHAR
?? 第 1 頁 / 共 5 頁
字號:
X * provided by the <stdlib.h> library and requires anX * integer argument.  The time function is providedX * by <time.h>.X */XXvoid Randomize(void)X{X    srand((int) time(NULL));X}XX/*X * Function: RandomIntegerX * -----------------------X * This function first obtains a random integer inX * the range [0..RAND_MAX] by applying four steps:X * (1) Generate a real number between 0 and 1.X * (2) Scale it to the appropriate range size.X * (3) Truncate the value to an integer.X * (4) Translate it to the appropriate starting point.X */XXint RandomInteger(int low, int high)X{X    int k;X    double d;XX    d = (double) rand() / ((double) RAND_MAX + 1);X    k = (int) (d * (high - low + 1));X    return (low + k);X}XX/*X * Function: RandomRealX * --------------------X * The implementation of RandomReal is similar to thatX * of RandomInteger, without the truncation step.X */XXdouble RandomReal(double low, double high)X{X    double d;XX    d = (double) rand() / ((double) RAND_MAX + 1);X    return (low + d * (high - low));X}XX/*X * Function: RandomChanceX * ----------------------X * This function uses RandomReal to generate a numberX * between 0 and 100, which it then compares to p.X */XXbool RandomChance(double p)X{X    return (RandomReal(0, 1) < p);X}END_OF_FILEif test 1718 -ne `wc -c <'cslib/random.c'`; then    echo shar: \"'cslib/random.c'\" unpacked with wrong size!fi# end of 'cslib/random.c'fiif test -f 'cslib/random.h' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/random.h'\"elseecho shar: Extracting \"'cslib/random.h'\" \(1962 characters\)sed "s/^X//" >'cslib/random.h' <<'END_OF_FILE'X/*X * File: random.hX * Version: 1.0X * Last modified on Fri Jul 22 16:44:36 1994 by erobertsX * -----------------------------------------------------X * This interface provides several functions for generatingX * pseudo-random numbers.X */XX#ifndef _random_hX#define _random_hXX#include "genlib.h"X#include <stdlib.h>XX/*X * Constant: RAND_MAXX * ------------------X * Unfortunately, several libraries that supposedly conform toX * the ANSI standard do not define RAND_MAX in <stdlib.h>.  ToX * reduce portability problems, this interface defines RAND_MAXX * to be the largest positive integer if it is undefined.X */XX#ifndef RAND_MAXX#  define RAND_MAX ((int) ((unsigned) ~0 >> 1))X#endifXX/*X * Function: RandomizeX * Usage: Randomize();X * -------------------X * This function sets the random seed so that the random sequenceX * is unpredictable.  During the debugging phase, it is best notX * to call this function, so that program behavior is repeatable.X */XXvoid Randomize(void);XX/*X * Function: RandomIntegerX * Usage: n = RandomInteger(low, high);X * ------------------------------------X * This function returns a random integer in the range low to high,X * inclusive.X */XXint RandomInteger(int low, int high);XX/*X * Function: RandomRealX * Usage: d = RandomReal(low, high);X * ---------------------------------X * This function returns a random real number in the half-openX * interval [low .. high), meaning that the result is alwaysX * greater than or equal to low but strictly less than high.X */XXdouble RandomReal(double low, double high);XX/*X * Function: RandomChanceX * Usage: if (RandomChance(p)) . . .X * ---------------------------------X * The RandomChance function returns TRUE with the probabilityX * indicated by p, which should be a floating-point number betweenX * 0 (meaning never) and 1 (meaning always).  For example, callingX * RandomChance(.30) returns TRUE 30 percent of the time.X */XXbool RandomChance(double p);XX#endifEND_OF_FILEif test 1962 -ne `wc -c <'cslib/random.h'`; then    echo shar: \"'cslib/random.h'\" unpacked with wrong size!fi# end of 'cslib/random.h'fiif test -f 'cslib/simpio.c' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/simpio.c'\"elseecho shar: Extracting \"'cslib/simpio.c'\" \(3581 characters\)sed "s/^X//" >'cslib/simpio.c' <<'END_OF_FILE'X/*X * File: simpio.cX * Version: 1.0X * Last modified on Fri Jul 15 14:10:41 1994 by erobertsX * -----------------------------------------------------X * This file implements the simpio.h interface.X */XX#include <stdio.h>X#include <string.h>XX#include "genlib.h"X#include "strlib.h"X#include "simpio.h"XX/*X * Constants:X * ----------X * InitialBufferSize -- Initial buffer size for ReadLineX */XX#define InitialBufferSize 120XX/* Exported entries */XX/*X * Functions: GetInteger, GetLong, GetRealX * ---------------------------------------X * These functions first read a line and then call sscanf toX * translate the number.  Reading an entire line is essential toX * good error recovery, because the characters after the point ofX * error would otherwise remain in the input buffer and confuseX * subsequent input operations.  The sscanf line allows white spaceX * before and after the number but no other extraneous characters.X */XXint GetInteger(void)X{X    string line;X    int value;X    char termch;XX    while (TRUE) {X        line = GetLine();X        switch (sscanf(line, " %d %c", &value, &termch)) {X          case 1:X            FreeBlock(line);X            return (value);X          case 2:X            printf("Unexpected character: '%c'\n", termch);X            break;X          default:X            printf("Please enter an integer\n");X            break;X        }X        FreeBlock(line);X        printf("Retry: ");X    }X}XXlong GetLong(void)X{X    string line;X    long value;X    char termch;XX    while (TRUE) {X        line = GetLine();X        switch (sscanf(line, " %ld %c", &value, &termch)) {X          case 1:X            FreeBlock(line);X            return (value);X          case 2:X            printf("Unexpected character: '%c'\n", termch);X            break;X          default:X            printf("Please enter an integer\n");X            break;X        }X        FreeBlock(line);X        printf("Retry: ");X    }X}XXdouble GetReal(void)X{X    string line;X    double value;X    char termch;XX    while (TRUE) {X        line = GetLine();X        switch (sscanf(line, " %lf %c", &value, &termch)) {X          case 1:X            FreeBlock(line);X            return (value);X          case 2:X            printf("Unexpected character: '%c'\n", termch);X            break;X          default:X            printf("Please enter a real number\n");X            break;X        }X        FreeBlock(line);X        printf("Retry: ");X    }X}XX/*X * Function: GetLineX * -----------------X * This function is a simple wrapper; all the work is done byX * ReadLine.X */XXstring GetLine(void)X{X    return (ReadLine(stdin));X}XX/*X * Function: ReadLineX * ------------------X * This function operates by reading characters from the fileX * into a dynamically allocated buffer.  If the buffer becomesX * full before the end of the line is reached, a new bufferX * twice the size of the previous one is allocated.X */XXstring ReadLine(FILE *infile)X{X    string line, nline;X    int n, ch, size;XX    n = 0;X    size = InitialBufferSize;X    line = GetBlock(size + 1);X    while ((ch = getc(infile)) != '\n' && ch != EOF) {X        if (n == size) {X            size *= 2;X            nline = (string) GetBlock(size + 1);X            strncpy(nline, line, n);X            FreeBlock(line);X            line = nline;X        }X        line[n++] = ch;X    }X    if (n == 0 && ch == EOF) {X        FreeBlock(line);X        return (NULL);X    }X    line[n] = '\0';X    nline = (string) GetBlock(n + 1);X    strcpy(nline, line);X    FreeBlock(line);X    return (nline);X}END_OF_FILEif test 3581 -ne `wc -c <'cslib/simpio.c'`; then    echo shar: \"'cslib/simpio.c'\" unpacked with wrong size!fi# end of 'cslib/simpio.c'fiif test -f 'cslib/simpio.h' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/simpio.h'\"elseecho shar: Extracting \"'cslib/simpio.h'\" \(2008 characters\)sed "s/^X//" >'cslib/simpio.h' <<'END_OF_FILE'X/*X * File: simpio.hX * Version: 1.0X * Last modified on Wed Apr 27 07:29:13 1994 by erobertsX * -----------------------------------------------------X * This interface provides access to a simple package ofX * functions that simplify the reading of input data.X */XX#ifndef _simpio_hX#define _simpio_hXX#include "genlib.h"XX/*X * Function: GetIntegerX * Usage: i = GetInteger();X * ------------------------X * GetInteger reads a line of text from standard input and scansX * it as an integer.  The integer value is returned.  If anX * integer cannot be scanned or if more characters follow theX * number, the user is given a chance to retry.X */XXint GetInteger(void);XX/*X * Function: GetLongX * Usage: l = GetLong();X * ---------------------X * GetLong reads a line of text from standard input and scansX * it as a long integer.  The value is returned as a long.X * If an integer cannot be scanned or if more characters followX * the number, the user is given a chance to retry.X */XXlong GetLong(void);XX/*X * Function: GetRealX * Usage: x = GetReal();X * ---------------------X * GetReal reads a line of text from standard input and scansX * it as a double.  If the number cannot be scanned or if extraX * characters follow after the number ends, the user is givenX * a chance to reenter the value.X */XXdouble GetReal(void);XX/*X * Function: GetLineX * Usage: s = GetLine();X * ---------------------X * GetLine reads a line of text from standard input and returnsX * the line as a string.  The newline character that terminatesX * the input is not stored as part of the string.X */XXstring GetLine(void);XX/*X * Function: ReadLineX * Usage: s = ReadLine(infile);X * ----------------------------X * ReadLine reads a line of text from the input file andX * returns the line as a string.  The newline characterX * that terminates the input is not stored as part of theX * string.  The ReadLine function returns NULL if infileX * is at the end-of-file position.X */XXstring ReadLine(FILE *infile);XX#endifEND_OF_FILEif test 2008 -ne `wc -c <'cslib/simpio.h'`; then    echo shar: \"'cslib/simpio.h'\" unpacked with wrong size!fi# end of 'cslib/simpio.h'fiif test -f 'cslib/strlib.c' -a "${1}" != "-c" ; then   echo shar: Will not clobber existing file \"'cslib/strlib.c'\"elseecho shar: Extracting \"'cslib/strlib.c'\" \(5382 characters\)sed "s/^X//" >'cslib/strlib.c' <<'END_OF_FILE'X/*X * File: strlib.cX * Version: 1.0X * Last modified on Fri Jul 15 14:10:41 1994 by erobertsX * -----------------------------------------------------X * This file implements the strlib.h interface.X */XX/*X * General implementation notes:X * -----------------------------X * This module implements the strlib library by mapping allX * functions into the appropriate calls to the ANSI <string.h>X * interface.  The implementations of the individual functionsX * are all quite simple and do not require individual comments.X * For descriptions of the behavior of each function, see theX * interface.X */XX#include <stdio.h>X#include <string.h>X#include <ctype.h>XX#include "genlib.h"X#include "strlib.h"XX/*X * Constant: MaxDigitsX * -------------------X * This constant must be larger than the maximumX * number of digits that can appear in a number.X */XX#define MaxDigits 30XX/* Private function prototypes */XXstatic string CreateString(int len);XX/* Section 1 -- Basic string operations */XXstring Concat(string s1, string s2)X{X    string s;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色诱亚洲精品久久久久久| 毛片一区二区三区| 亚洲国产精品一区二区久久恐怖片| 久久精品国产色蜜蜜麻豆| 国产99久久久精品| 国产蜜臀97一区二区三区| 色婷婷av一区| 中文字幕av一区二区三区免费看| 悠悠色在线精品| 麻豆成人久久精品二区三区小说| 欧美日韩一区二区三区四区五区| 亚洲一区二区不卡免费| 欧美日韩视频在线观看一区二区三区| 日韩在线一二三区| 日韩免费性生活视频播放| 色综合久久综合| 欧美tk—视频vk| 99综合影院在线| 亚洲成人精品一区二区| 久久精品一区二区三区四区| 欧美唯美清纯偷拍| 成人伦理片在线| 1区2区3区欧美| 亚洲日本一区二区三区| 色欧美片视频在线观看在线视频| 性做久久久久久免费观看| 精品黑人一区二区三区久久| 蜜臀a∨国产成人精品| 亚洲精品视频观看| 亚洲欧美韩国综合色| 成人免费在线视频| 99久久国产综合精品色伊| 日本美女视频一区二区| 一区二区视频在线看| 欧美一二三区在线| 欧美电影免费提供在线观看| 色菇凉天天综合网| 丁香啪啪综合成人亚洲小说| 国产米奇在线777精品观看| 中文字幕一区二区三区四区不卡| 国产亚洲精品福利| www激情久久| 国产女同性恋一区二区| 欧美精品一区二| 国产精品不卡在线| 国产精品原创巨作av| 在线观看日韩高清av| 日韩精品一区二区三区老鸭窝| 老鸭窝一区二区久久精品| 亚洲欧美日韩久久精品| 亚洲国产乱码最新视频| 自拍视频在线观看一区二区| 中文字幕一区av| 亚洲成人av在线电影| 亚洲高清视频在线| 在线免费观看成人短视频| 一区二区三区在线视频播放| 欧美激情在线观看视频免费| 亚洲图片另类小说| 一区二区三区在线影院| 91亚洲午夜精品久久久久久| 久久精品国产免费看久久精品| 一本色道a无线码一区v| 91在线观看污| 日本一二三不卡| 免费一级片91| 欧美在线短视频| 国产精品国产馆在线真实露脸 | 久久久99精品免费观看| 国产电影一区二区三区| 亚洲精品亚洲人成人网 | 一区二区在线看| 欧美日韩国产精选| 国产福利一区二区三区视频| 一区二区三区精品视频在线| 精品国产凹凸成av人网站| 国产伦精品一区二区三区免费迷| 国产999精品久久久久久| 91亚洲午夜精品久久久久久| 麻豆精品视频在线观看视频| 国产女主播一区| 久久久一区二区三区捆绑**| 欧美三日本三级三级在线播放| 成人性视频网站| 国产制服丝袜一区| 久久精品国产久精国产爱| 图片区小说区区亚洲影院| 最新国产成人在线观看| 久久久国产精品午夜一区ai换脸| 欧美一区二区三区播放老司机| 99r精品视频| 色综合久久综合中文综合网| 久久99久久99| 男人的天堂久久精品| 亚洲精品v日韩精品| 亚洲色图.com| 一区二区三区日韩在线观看| 91丨九色porny丨蝌蚪| 国产亚洲欧洲一区高清在线观看| 国产一区二区三区电影在线观看 | 亚洲午夜精品在线| 在线区一区二视频| 精品系列免费在线观看| 亚洲国产精品成人综合| 欧美日韩亚洲高清一区二区| 欧美日韩五月天| 欧美国产精品一区| 日日摸夜夜添夜夜添国产精品| 精品伊人久久久久7777人| 成人黄色小视频| 91精品久久久久久久久99蜜臂| 久久久综合视频| 日本大胆欧美人术艺术动态| 国产1区2区3区精品美女| 99v久久综合狠狠综合久久| 黑人巨大精品欧美黑白配亚洲| 亚洲国产三级在线| 亚洲国产日韩a在线播放| 亚洲v中文字幕| 麻豆免费看一区二区三区| 日本一区中文字幕| 国产老女人精品毛片久久| 国产麻豆精品在线| av高清久久久| 制服丝袜av成人在线看| 日韩一区二区三区电影| 国产欧美视频一区二区三区| 亚洲人成网站影音先锋播放| 亚洲国产你懂的| 另类专区欧美蜜桃臀第一页| 成人综合在线视频| 欧美色综合影院| 国产欧美日韩三级| 亚洲一区在线播放| 成人综合婷婷国产精品久久蜜臀| 99久久精品99国产精品| 精品国产电影一区二区| 亚洲日本丝袜连裤袜办公室| 免费成人小视频| 99久久久无码国产精品| 欧美一级专区免费大片| 亚洲乱码中文字幕| 国产老女人精品毛片久久| 欧美日韩视频在线第一区| 国产精品午夜久久| 国产99久久久国产精品免费看| 欧美一区二区福利在线| 国产精品国产精品国产专区不蜜 | 韩国欧美一区二区| 欧美二区在线观看| 日韩激情一二三区| 欧美午夜精品久久久| 丝袜美腿亚洲色图| 欧美成人猛片aaaaaaa| 国产综合色在线| 亚洲人一二三区| 欧美一区二区三区男人的天堂| 亚洲成人www| 国产丝袜欧美中文另类| 91在线观看免费视频| 午夜欧美大尺度福利影院在线看| 欧美精品三级在线观看| 国产不卡一区视频| 亚洲电影一区二区| 亚洲国产成人午夜在线一区 | 精品国产免费人成在线观看| 国产一区二区精品久久| 亚洲狼人国产精品| 国产亚洲短视频| 欧美色图免费看| 国产xxx精品视频大全| 亚洲福利一区二区| 国产欧美在线观看一区| 欧美中文字幕亚洲一区二区va在线| 毛片基地黄久久久久久天堂| 亚洲综合视频网| 中文久久乱码一区二区| 国内国产精品久久| 久久人人97超碰com| 精品一区二区精品| 一区二区成人在线| 亚洲国产高清在线观看视频| 欧美不卡123| 日韩午夜电影在线观看| 欧美日本一道本在线视频| 不卡的av网站| 色妹子一区二区| 91视频.com| 欧美日韩三级一区| 制服丝袜激情欧洲亚洲| 精品91自产拍在线观看一区| 欧美一级欧美一级在线播放| 欧美日韩二区三区| 欧美伦理电影网| 日本一区二区三区dvd视频在线| 99国产精品99久久久久久| 亚洲免费观看在线视频| 午夜久久久影院| 亚洲天堂精品在线观看| 国产喷白浆一区二区三区|