Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following code, which is part of a larger program: int userVar 1 , userVar 2 , result; cin > > userVar 1 ;

Consider the following code, which is part of a larger program:
int userVar1, userVar2, result;
cin >> userVar1;
cin >> userVar2;
if (userVar2>=userVar1){
result =_____;
} else {
result =_____;
}
cout << result;
The first number inserted by the user is stored in the variable called
, and the second number inserted by the user is called
.
The goal of this code is to output the bigger of the two numbers inserted by the user. To achieve that, we should fill the first space with the variable
and the second space with the variable

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions