Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int t,shtor,lamp;
- float time;
- setlocale(LC_ALL, "Russian");
- cout << "введите сколько времени" << endl;
- cin >> time;
- if ((time >= 6.00) && (time <= 18.00)){
- t = 1;
- }
- else {
- t = 0;
- }
- cout << "состояние штор?(1-раздвинуты,0-задвинуты)" << endl;
- cin >> shtor;
- cout << "лампа?(1-вкл,0-выкл)" << endl;
- cin >> lamp;
- if (lamp == 1) {
- cout << "в комнате светло" << endl;
- }
- else {
- if ((shtor == 1) && (t == 1)) {
- cout << "в комнате светло" << endl;
- }else{
- cout << "в комнате темно" << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement