#include <stdio.h>
#include <time.h>
#include <stdlib.h>
const char* subjects[] = {“春天”, “夏天”, “秋天”, “冬天”, “山水”, “人生”, “情感”, “家乡”, “回忆”, “未来”};
const char* verbs[] = {“到来”, “离去”, “流逝”, “回首”, “倾听”, “凝望”, “追寻”, “感受”, “祈愿”, “思考”};
const char* objects[] = {“花开”, “鸟语”, “溪流”, “云卷云舒”, “绿树成荫”, “沧海桑田”, “岁月无声”, “故人思念”, “家乡记忆”, “未来希望”};
int main() {
srand((unsigned)time(NULL));
int i, num;
printf("请输入诗的句数:");
scanf("%d", &num);
for(i = 0; i < num; i++) {
int s = rand() % 10;
int v = rand() % 10;
int o = rand() % 10;
printf("%s%s%s,\n", subjects[s], verbs[v], objects[o]);
}
printf("\n");
return 0;
}