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

#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;
}
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐