C++学习2 - 枚举型常量

xiaoxiao2021-02-28  95

#include<iostream> using namespace std;

int main(){  enum day{sun,mon,tue,wed,thu,fri,sat};  day today;  today = sat;  if (today == sun || today == sat){   cout << "zhoumu";  }else{   cout << "gongzuo";  }  system("pause");  return 0; }

更多详情请点击  http://blog.sina.com.cn/zhaojianjunzjj

 

转载请注明原文地址: https://www.6miu.com/read-74139.html

最新回复(0)