Print "userNum1 is negative." if userNum1 is less than 0. End with newline. Assign userNum2 with 1 if userNum2 is greater than 13. Otherwise, print "userNum2 is less than or equal to 13.". End with newline.
Print "userNum1 is negative." if userNum1 is less than 0. End with newline. Assign userNum2 with 1 if userNum2 is greater than 13. Otherwise, print "userNum2 is less than or equal to 13.". End with newline.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![345154.2174782.qx3zqy7
Jump to level 1
Print "userNum1 is negative." if userNum1 is less than 0. End with newline.
Assign userNum2 with 1 if userNum2 is greater than 13. Otherwise, print "userNum2 is less than or equal to 13.". End with
newline.
1 #include <iostream>
2 using namespace std;
3
4 int main() {
int userNum13;
int userNum23;
9.
cin >> userNum1;
cin >> userNum2;
8.
6.
10
if (userNum1 < 0) {
cout<<"userNum1 is negative"<<endl%;
}
else if (userNum2 > 13) {
cout<<"userNum2 = userNum1"<<endl;
11
12
13
14
15
16
else {
cout<<"userNum2 is less than or equal to 13"<<endl;
17
18
19
20
<< userNum2 << endl:
21
cout << "userNum2 is
22
23
return 0;
24 }](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ffd3c0046-ab17-4153-addb-6532ca1c6c56%2F8f606900-4a76-4bea-9c82-535ecbdbc9ae%2F6f8wv5e_processed.jpeg&w=3840&q=75)
Transcribed Image Text:345154.2174782.qx3zqy7
Jump to level 1
Print "userNum1 is negative." if userNum1 is less than 0. End with newline.
Assign userNum2 with 1 if userNum2 is greater than 13. Otherwise, print "userNum2 is less than or equal to 13.". End with
newline.
1 #include <iostream>
2 using namespace std;
3
4 int main() {
int userNum13;
int userNum23;
9.
cin >> userNum1;
cin >> userNum2;
8.
6.
10
if (userNum1 < 0) {
cout<<"userNum1 is negative"<<endl%;
}
else if (userNum2 > 13) {
cout<<"userNum2 = userNum1"<<endl;
11
12
13
14
15
16
else {
cout<<"userNum2 is less than or equal to 13"<<endl;
17
18
19
20
<< userNum2 << endl:
21
cout << "userNum2 is
22
23
return 0;
24 }
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Similar questions
- Recommended textbooks for youDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSONC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag…Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education