fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. char chars[] = {'a','h','z','e','d','l','y','l','s','o'};
  5. for(char *c = chars; c < chars + (sizeof(chars) / sizeof(*chars)); c++){
  6. switch(*c){
  7. case 'h': cout<<'h'; break;
  8. case 'e': cout<<'e'; break;
  9. case 'l': cout<<'l'; break;
  10. case 'o': cout<<'o'; break;
  11. default: break;
  12. }
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 4500KB
stdin
Standard input is empty
stdout
hello