C言語初級演習問題の解答例
実験1:乱数を用いた学籍番号生成
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define COUNT 5
#define BASE_LOW 397
#define BASE_HIGH 376
#define BASE_ALT 21
int main() {
int iteration = 0;
int type, extra;
srand((unsigned)time(NULL));
while (iteration < COUNT) {
type = rand() % 2;
...
7月29日 03:22 投稿