Advertisement
Guest User

сломанная хуетень

a guest
Sep 11th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. setlocale(LC_ALL, "rus");
  6. int t; //Время суток
  7. int tl;//включенная лампа
  8. int sh; //Штора
  9. int x;
  10. cout << "Введите час\n";
  11. cin >> t;
  12. if ((t > 24) || (t < 0)) { cout << "Введи нормальное время\n"; }
  13. else
  14. {
  15. cout << "Штора открыта или нет (1-да 0-нет)\n";
  16. cin >> sh;
  17. cout << "Работает ли лампа (1-да 0-нет)\n";
  18. cin >> tl;
  19.  
  20. if ((t < 20) and (t > 6)) { x = 1; }
  21. else { x = 0; }
  22. if (((x == 1) and (sh == 0)) || (tl = 1)) { cout << "В комнате светло"; }
  23. else { cout << "В комнате темно"; }
  24. return 0;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement