C言語プログラミング実験:制御構造と乱数処理の応用
実験任務1
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define STUDENT_COUNT 5
int main() {
int id_value;
int counter;
srand(time(NULL));
for (counter = 0; counter < STUDENT_COUNT; counter++) {
id_value = rand() % 100 + 1;
printf("20240042%04d\n", id_value);
}
system(" ...
5月22日 04:23 投稿