Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000. First image is my attempt , second without
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000. First image is my attempt , second without
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
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000. First image is my attempt , second without
![e
2002
Homepage - Southern New Ham X
https://learn.zybooks.com/zybook/CS-210-T4130-OL-TRAD-UG.23EW4/chapter/3/section/4
F2
boks My library > CS 210: Programming Languages home > 3.4: Detecting ranges with branches
468126.2601242.qx3zqy7
Jump to level 1
Type here to search
X
F3
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000.
Ex: If the input is 1000 450, then the output is:
1000
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5
6
7
8
9
10
11
12
13
14
15
16 }
int userVal;
int maxVal;
cin >> userVal;
cin >> maxVal;
cout << maxVal << endl;
return 0;
1
F4
Bi
1 2-1 zyBooks Participation Activiti X
I
F5
C
41
F6
2
zy Section 3.4- CS 210: Programmir X
F7
F8
3
F9
EzyBooks cata
F10
+
4
F](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5688e886-d1a1-41d0-9033-93b930693201%2Fcb0dace8-a901-4815-8a3b-f90fbdc6ded3%2F3ggiqex_processed.jpeg&w=3840&q=75)
Transcribed Image Text:e
2002
Homepage - Southern New Ham X
https://learn.zybooks.com/zybook/CS-210-T4130-OL-TRAD-UG.23EW4/chapter/3/section/4
F2
boks My library > CS 210: Programming Languages home > 3.4: Detecting ranges with branches
468126.2601242.qx3zqy7
Jump to level 1
Type here to search
X
F3
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000.
Ex: If the input is 1000 450, then the output is:
1000
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5
6
7
8
9
10
11
12
13
14
15
16 }
int userVal;
int maxVal;
cin >> userVal;
cin >> maxVal;
cout << maxVal << endl;
return 0;
1
F4
Bi
1 2-1 zyBooks Participation Activiti X
I
F5
C
41
F6
2
zy Section 3.4- CS 210: Programmir X
F7
F8
3
F9
EzyBooks cata
F10
+
4
F
![Homepage - Southern New Ham X
https://learn.zybooks.com/zybook/CS-210-T4130-OL-TRAD-UG.23EW4/chapter/3/section/4
468126.2601242.qx3zqy7
My library > CS 210: Programming Languages home > 3.4: Detecting ranges with branches
e to search
X
Jump to level 1
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5 int userval;
6
int maxVal;
7
8
9
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000.
Ex: If the input is 1000 450, then the output is:
1000
10
11
12
13
14
15
16
17 }
Check
cin >> userVal;
cin >> maxVal;
if (userVal<- 1000) {
cout << "1000"<< endl;
}
cout << maxVal << endl;
2-1 zyBooks Participation Activiti X
return 0;
1
Et
zy Section 3.4 - CS 210: Programmir X
2
EzyBooks cat
3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5688e886-d1a1-41d0-9033-93b930693201%2Fcb0dace8-a901-4815-8a3b-f90fbdc6ded3%2Fwnfy3na_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Homepage - Southern New Ham X
https://learn.zybooks.com/zybook/CS-210-T4130-OL-TRAD-UG.23EW4/chapter/3/section/4
468126.2601242.qx3zqy7
My library > CS 210: Programming Languages home > 3.4: Detecting ranges with branches
e to search
X
Jump to level 1
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5 int userval;
6
int maxVal;
7
8
9
Integers userVal and maxVal are read from input. If userVal is 1000 or less, assign maxVal with 1000.
Ex: If the input is 1000 450, then the output is:
1000
10
11
12
13
14
15
16
17 }
Check
cin >> userVal;
cin >> maxVal;
if (userVal<- 1000) {
cout << "1000"<< endl;
}
cout << maxVal << endl;
2-1 zyBooks Participation Activiti X
return 0;
1
Et
zy Section 3.4 - CS 210: Programmir X
2
EzyBooks cat
3
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 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education