怎么用C语言随机生成我指定的几句话呢?比如说“谢谢”“不客气”等等。
```c
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main() {
srand(time(NULL));
int a;
a = rand() % 2;
switch (a = rand() % 2)
{
case 0: printf("谢谢"); break;
case 1: printf("不客气"); break;
}
return 0;
}
我是初学者可能写的不太好,但是确实能用
```