定义枚举类型加上两个变量

#include stdio.h int main(void) { enum Weekday {Monday, Tuesday, Wednesday, Thursday,Friday, Saturday, Sunday} today, tomorrow;

编程学习网为您整理以下代码实例,主要实现:定义枚举类型加上两个变量,希望可以帮到各位朋友。

#include <stdio.h> 
int main(voID) { 

  enum Weekday {Monday, Tuesday, Wednesday, Thursday,
                             FrIDay, Saturday, Sunday} today, tomorrow;

  printf("Weekday created\n");

  printf("%d\n",today);
  printf("%d\n",tomorrow);

  return 0;
}

本文标题为:定义枚举类型加上两个变量

下一篇: 枚举范围

基础教程推荐