c语言一个小程序的问题

来源:百度知道 编辑:UC知道 时间:2024/05/11 00:31:35
#include<stdlid.h
#include<stdio.h>
typedef enum {一,二,三,四,五,六,七,八,九,十}SHOU;
int main()
{
int a,b;
SHOU shou;
printf("随机输入一至十中的一个汉字:\n");
a=rand;
if(a>=10)
{
for(b=0;a>=10;a\2)
{
if(a<10)
b=a;
}
}
else
b=a;
shou=(SHOU)(B);
printf("随机汉字为:%s",shou);
return 0;
}

我自己编的,有错误,请大虾们help me.

#include<stdlid.h :应为#include <stdlib.h>
typedef enum {一,二,三,四,五,六,七,八,九,十}SHOU; :此处不能使用中文。
a=rand; :应为a=rand();
for(b=0;a>=10;a\2) :应为for(b=0;a>=0;a/=2)※不知道你什么意思……

这位同志,请问你想要干啥?