1.程序:
#include<stdio.h>
enum os
{
WIN,
LINUX,
UNIX
};
int main()
{
printf("%d %d %d\N",WIN,LINUX,UNIX);
return 0;
}
结果:
0 1 2N
Press any key to continue
2.程序:
#include<stdio.h>
enum os
{
WIN=1,
LINUX,
UNIX=12
};
int main()
{
printf("%d %d %d\N",WIN,LINUX,UNIX);
return 0;
}
结果:
1 2 12N
Press any key to continue
时间: 2024-10-13 22:45:29