21.0k views
1 vote
Write a statement containing a logical expression that assigns true to the

boolean variable isCandidate if satScore is greater than or equal to 1100, gpa is not
less than 2.5, and age is greater than 15. Otherwise, isCandidate should be false

1 Answer

5 votes

Answer:

Following are the logical statement

if( ( satScore >=1100 ) && ( gpa>2.5 ) && ( age>15 ) ) // check all condition

{

isCandidate=true;// assign True to the boolean variable isCandidate

}

else

{

isCandidate=false; // assign false to the boolean variable isCandidate

}

Step-by-step explanation:

In this code we Check the condition in the if block that is " checking satScore variable > = 1100, gpa > 2.5 and age>15 if all the condition are true then it assigning the "true" to the boolean variable "isCandidate" otherwise assign "false" in the boolean variable "isCandidate".

User Darioo
by
6.4k points