CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Created by Sandra
#include <iostream>
using namespace std;
int main()
{
int age;
int sleep;
cout << "What is your age \n";
cin >> age;
cout << "How long do you sleep everynight? \n";
cin >> sleep;
if (age < 2 && sleep > 13) {
cout << "You sleep enough!" << endl;
}
if (age < 2 && sleep < 14) {
cout << "You don't sleep enough!" << endl;
}
if (age == 2 && sleep > 10) {
cout << "You sleep enough!" << endl;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run