fork download
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C/C++.
  5. Code, Compile, Run and Debug online from anywhere in world.
  6.  
  7. *******************************************************************************/
  8. #include <iostream>
  9.  
  10. using namespace std;
  11. enum seasons {spring,summer,autumn,winter};
  12. int main()
  13. {
  14. seasons s;
  15. s = spring;
  16. cout<<"spring = " << s << endl;
  17. s = spring;
  18. cout<<"summer = " << s << endl;
  19. s = spring;
  20. cout<<"autumn = " << s << endl;
  21. s = spring;
  22. cout<<"winter = " << s << endl;
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5420KB
stdin
45
stdout
spring = 0
summer = 0
autumn = 0
winter = 0