fork(1) download
  1. #include <stdio.h>
  2. #include <stdbool.h> //буль-буль
  3.  
  4. enum { //константы
  5. PEETOOH, PEETOOSHARA, PEETOOSHOK, neTyx = 42
  6. };
  7.  
  8. const char const * TY_PETYX = "ТЫ ПЕТУХ!"; //тоже константа
  9.  
  10. bool is_petyx(int petyx)
  11. {
  12. if (petyx == PEETOOH || petyx == PEETOOSHARA || petyx == PEETOOSHOK || petyx == neTyx)
  13. return true;
  14. return true;
  15. }
  16.  
  17. int guest;
  18.  
  19. int main(void)
  20. {
  21. if (is_petyx(guest))
  22. puts(TY_PETYX);
  23. return 0;
  24. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
ТЫ ПЕТУХ!